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
Override: Not supported - files are not loaded
classmethod DebugRunTestCase(testsuite As %Library.String = "", testcase As %Library.String = "", qspec As %Library.String = "", testmethod As %Library.String = "", ByRef userparam As %Library.String) as %Status
Override: Not needed - use Run() from a HS.Test.TestCase subclass instead
method LogError(message)
Log a message as an error
method PrintURL()
Override: Use HS.Test aware report page
classmethod Resolve(ByRef pInput, ByRef pOutput) as %Status
Given an input array of items, return a sorted list based on dependencies
tInput(- [,
])=""
tOutput(,- )=""
Returns an error if a circular dependency is found
Alias for RunTest method
Override: Run methods in order of definition, not alphabetical
Override: Skip loading/deleting classes from files. Now there is a 1:1 correspondance between suite and test-case for sequencing
Override : Force manditory /noload and /nodelete flags
testspec : Now userparam: Top node looks like qspec and will be parsed and added to UserFields
/package=
Override: Loop over class heirarchy rather than directories.
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()