Adopted from InterSystems's %UnitTest.Manager by logist (Dimas ltd., Russia) Adapted to Van Hoecke's needs by JCL and FMA do ##class(vhUnitTest.Manager).RunTest() to run all tests. You can turn on debug mode by do ##class(vhUnitTest.Manager).RunTest("/debug=1") You can run unittest within a specific package using ##class(vhUnitTest.Manager).RunTest(,packagename) vhLib.Macro 1 %RegisteredObject 0 1 1 0 1 qualifiers,package="" %Status 1 qualifiers,userparam="",package="" %Status 1 suite:%String,class:%String ",2,32767))),method) . . . Quit . Goto AfterAllTests MethErrorOnBeforeAllTests . Set zhend=$zh Do ..LogStateStatus($$$ERROR($$$CacheError,$ze_":"_$Text(@$Piece($ze,">",2,32767))),"OnBeforeAllTests") AfterAllTests . Set:'..Debug $zt= "MethErrorOnAfterAllTests" . Set sc=testcase.OnAfterAllTests() If $$$ISERR(sc) Do ..LogStateStatus(sc,"OnAfterAllTests") Quit . Goto Einde MethErrorOnAfterAllTests . Set zhend=$zh Do ..LogStateStatus($$$ERROR($$$CacheError,$ze_":"_$Text(@$Piece($ze,">",2,32767))),"OnAfterAllTests") Goto Einde Einde . Set $zt = "" . Kill testcase Do ..LogStateEnd(suite) ; Quit ]]> testsuite,testcase,testmethod testsuite,testcase,testmethod status,action success,action,description message text,level text suite,case,method,action %Boolean suite,case,method,action %Boolean 1