Skip to main content


The %UnitTest.ManagerOpens in a new tab class also contains the DebugRunTestCase method. To use this method, you must still first assign ^UnitTestRoot to a valid directory:

USER>Set ^UnitTestRoot="C:\UnitTests"

Here's an example:

USER>Do ##class(%UnitTest.Manager).DebugRunTestCase("mytests","MyPackage.Tests","","")

  • The method does not load any classes from any directories nor does it delete any classes from Caché.

  • The method executes the tests contained in MyPackage.Tests.

  • The optional third argument is for qualifiers.

  • The optional fourth argument is for specifying an individual test method within the test class to execute.

  • If a test fails, the method continues to execute the remaining test methods, but will break on completion of the tests. So, if you are executing from the Terminal, the Terminal will enter debugging mode.


When using DebugRunTestCase, mytests directory need not actually contain MyPackage.Tests. By contrast RunTest always requires that the test to be executed be contained in a subdirectory of ^UnitTestRoot even when using “/noload”.

FeedbackOpens in a new tab