You can use prior status to restrict the set of tests to be run in one of two ways, as follows:
You can also use the Configuration Editor window in Question Mode to specify test run restrictions based on results from a prior test run.
By choosing Select tests that match, you can run tests with restrictions based on their result from a prior test run. The following table describes the available Prior Status filter selections.
Prior Status | Action |
---|---|
Passed | Selects tests that passed the last time the test was executed. |
Failed | Selects tests that failed the last time the test was executed. |
Error | Selects tests that the JavaTest harness could not execute the last time it was included in a test run. |
Not Run | Selects tests without results in the current work directory. |
Prior status is evaluated on a test-by-test basis using information stored in
the result files (.jtr
) that are written in
the work directory. Unless overridden by a test suite, a result file is written
in the work directory for every test that is executed. When you change work
directories between test runs, the result files in the previous work directory
are no longer used and, if the new work directory is empty, the JavaTest harness
behaves as though each test in the test suite was not run.
You can also use the Prior Status setting in combination with the Current Configuration
view filter to display only those test and folder status icons that match the
specified prior status. The test tree displays all other tests and folders
as gray, filtered out folder
and
test
icons. During a test run, when a test result no
longer matches the prior status filter, the test tree changes the test and
folder icons to gray, filtered out
folder
and
test
icons.
For example, if you only want to monitor tests in a test suite that had failed results you would set the Prior Status filter to Any Of Failed and repeat the test run. As tests pass, the test tree changes their icons from failed to filtered out, indicating that they no longer match the Prior Status filter Any Of Failed.
It is often useful to choose all of the status values except Passed for the first
few test runs, then refine the filtering to reduce the number of tests in subsequent
runs.