Conditions That Define When Tests Run
There can be times when a test or a group of tests in the XJRunner test list has conditions attached that ensure it only runs when certain criteria are met. As an example, a condition can be created in the test list that will prevent an attempt to program a memory if the device has failed an interconnection test.
Conditions use XJEase functions such as HAS_PASSED() and HAS_RUN() and are represented in XJRunner and XJDeveloper’s test lists by the symbol as shown in Figure 6. The condition is evaluated just before the group is due to be executed, and the tests are only performed if the condition evaluates to TRUE.
In this example, the nested conditions Check Data Integrity and Full Program will only be evaluated if the Program Flash condition at the top of the hierarchy is TRUE.

Figure 6: Conditions Controlling when Tests and Test Groups Run
- More information on using Conditions can be found in the help files for XJDeveloper.
When XJIntegration runs a test list, it will obey these criteria by default, but you can override them by using methods of the Condition class such as Override(), which stops the condition being evaluated.
Running Tests with Conditions by Themselves
Users should be aware that if a test has conditions that require another test to have passed first, trying to use RunTest() to execute just that one test in isolation will not work. In that situation, either use RunTests() to run both tests in sequence, or use Override() to disable the condition.
- When writing conditions that rely on the result of another test, it is recommended you incorporate the HAS_RUN() function in the condition. This avoids the runtime error that will occur if HAS_PASSED() is used on a test that hasn’t run. For example, use HAS_RUN("IC3.TestMem") &&? HAS_PASSED("IC3.TestMem") instead of just HAS_PASSED("IC3.TestMem").
XJTAG v4.1.101