HS.Test.Manager
class HS.Test.Manager extends %UnitTest.Manager
HealthShare aware %UnitTest framework that is class driven instead of file driven.Differences from the %UnitTest.Manager:
- Test cases extend HS.Test.TestCase
- Test cases are not loaded or deleted. They exist as classes under the HS.Test package.
- Test case methods are executed in the order defined in the class, not alphabetically.
- Instead of a directory, the first piece of testspec is a package name.
- In addition to a full class name, the second piece of testspec can be a simple class name that will assume the package from the first piece.
- Test case classes are able to be run independently from the framework for debugging during development.
- Test case classes can maintain state between test methods.
- Test case classes are intended to call eachother. See HS.Test.TestCase for more details.
- Changes the report to a new URL that is aware of method invocation sequencing change.
Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE.PIXv3")
Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE.PIXv3","/norecursive")
break
on the first error:
Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE.PIXv3","/debug")
Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE.PIXv3:Consumer") Do ##class(HS.Test.IHE.PIXv3.Consumer).Run()
Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE.PIXv3:Consumer:TestRevisePatient") Do ##class(HS.Test.IHE.PIXv3.Consumer).Run("TestRevisePatient")
Do ##class(HS.Test.IHE.PIXv3.Consumer).RevisePatient("Patient1")
Method TestWidget() { If '..Manager.UserFields.GetAt("core") Quit //do the normal test here } Method TestInvalidWidget() { If '..Manager.UserFields.GetAt("errors") Quit //do the error condition test here } Method TestExternalWidget() { If '..Manager.UserFields.GetAt("external") Quit //do the external condition test here } Do ##class(HS.Test.Manager).RunTest("HS.Test.IHE",,"/errors=0")
Method Inventory
- DebugLoadTestSuite()
- DebugRunTestCase()
- LogError()
- PrintURL()
- Resolve()
- Run()
- RunOneTestCase()
- RunOneTestSuite()
- RunTest()
- RunTestSuites()
Methods
testspec : Now userparam: Top node looks like qspec and will be parsed and added to UserFields
/package=
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %INCLUDE()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Cleanup()
- CleanupAllProcVals()
- CleanupGeneralProcVals()
- CleanupSpecificProcVals()
- ConvertLogData()
- ConvertStatus()
- GetSubDirectories()
- GetTestState()
- GetTestStatus()
- IsSuccess()
- LogAssert()
- LogMessage()
- LogStateBegin()
- LogStateEnd()
- LogStateStatus()
- OnAfterAllTests()
- OnAfterOneTest()
- OnAfterSaveResult()
- OnAfterTestCase()
- OnAfterTestSuite()
- OnBeforeAllTests()
- OnBeforeAutoLoad()
- OnBeforeOneTest()
- OnBeforeTestCase()
- OnBeforeTestSuite()
- PrintErrorLine()
- PrintLine()
- PurgeLog()
- PurgeResult()
- Record()
- RecordProcVals()
- Root()
- RunTestsFromFileList()
- SaveResult()
- WipeNamespace()
- addToExcludeGlobal()
- deleteLoadedClasses()
- getLoadedClass()
- getTestMethods()
- setRecursiveStatus()