Running Tests

After XJLink and Project instances have been created, the tests can be run. To execute a test using the methods associated with XJRunner, an instance of the Runner class should now be created. To use the methods of XJAnalyser, an instance of the ChainRunner class should be created. This process is described below.

A Runner is a runtime object that represents the tests being executed and their associated global variables.

  • Once the Runner or ChainRunner instance is created, the XJLink it uses will become unavailable for use elsewhere; it will be released when the instance using it is disposed.
  • To test several boards in parallel, multiple XJLinks can be used simultaneously. This is done by creating the required number of XJlink instances and Runner instances, and associating each Runner with a unique XJLink.

In this section, the following topics are described:

  • Dealing with tests that have conditions to define when they run
  • Using XJRunner Integration
    • Creating a Runner instance
    • Running single tests
    • Using a test collection to run multiple tests
    • The difference between using Start() and Run()
    • The difference between tests and functions
    • Disposing the Runner object after each board has been tested
  • Using XJAnalyser Integration
    • Creating a ChainRunner instance
    • Accessing the XJAnalyser Integration functions
    • Disposing the ChainRunner object after work on each board has been completed