Skip to main content

DebugRunTestCase

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 InterSystems IRIS.

  • 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.

  • The optional fifth argument is an arbitrary user-defined argument.

  • 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.

Note:

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