%UnitTest.TestScript
class %UnitTest.TestScript extends %UnitTest.TestCase
This class is an example of extending the TestCase class for your own testing needs. It provides the TestRunScript() method, which replays the script specified in the TESTFILE parameter, comparing it to a reference log of expected output.To use this class for your tests, write a subclass that implements the runScript() method to read a script and generate repeatable output. Pass the string "reference" as the userparam parameter to the RunTest method to record the expected output to reference.log:
d ##class(%UnitTest.Manager).RunTest("example\suite",,"reference")
d ##class(%UnitTest.Manager).RunTest("example\suite")
Method Inventory
Parameters
Methods
When the "reference" parameter is specified, it writes expected output to reference.log. Otherwise, it compares the output to reference.log using $$$AssertFilesSame (or $$$AssertFilesSQLUnorderedSame if the UNORDEREDFILESAME parameter is set).
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnNew()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- AssertEqualsViaMacro()
- AssertFailureViaMacro()
- AssertFilesSQLUnorderedSameViaMacro()
- AssertFilesSameViaMacro()
- AssertNotEqualsViaMacro()
- AssertNotTrueViaMacro()
- AssertSkippedViaMacro()
- AssertStatusEqualsViaMacro()
- AssertStatusNotOKViaMacro()
- AssertStatusOKViaMacro()
- AssertSuccessViaMacro()
- AssertTrueViaMacro()
- Checkout()
- LogMessage()
- OnAfterAllTests()
- OnAfterOneTest()
- OnBeforeAllTests()
- OnBeforeOneTest()