Skip to main content

Example: Executing the Test

After loading the production and the test class, you can execute the test using the Terminal. Here's how to do this using the TestProduction Run method:

  1. Open the Terminal and change to the namespace in which you installed the production and test classes.

  2. Assign ^UnitTestRoot to a either a valid directory or the empty string.

    
    TUTORIAL>Set ^UnitTestRoot="" 
     
    Copy code to clipboard
  3. Execute the test

    
    TUTORIAL>Do ##class(Tutorial.ProductionTest).Run()
     
    Copy code to clipboard

    Your output looks something like this

    generated description: testprod run 20181

Notice that the last line is a url. Use this url to view an HTML report on the test.

FeedbackOpens in a new window