Using Prior Status as a Filter

You can use the Prior Status pane in the Standard Values view to restrict the set of tests to be run.

The Prior Status pane from the Configuration Editor: Standard Values view

By choosing Select tests that match, you can run tests with restrictions based on their result from a prior test run:

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.

If a Prior Status filter is selected and the Current Configuration view filter is set, the test tree only displays the status of tests and folders that match the Prior Status filter. The test tree displays all other tests and folders as gray status icons.

During a test run, when the status of a test or folder changes and no longer matches the Prior Status filter, the test tree displays it as a gray icon.

Example:

A test run has failed tests. You set the Prior Status filter to "any of failed" and repeat the test run. As tests pass, the test tree displays gray folder and test status icons, indicating that they no longer match the "any of failed" Prior Status filter.

The following text is a Note
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.

Prior status is evaluated on a test-by-test basis using information stored in result files (.jtr) 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.

If you change the work directory between test runs, the result files will not be found. If the new work directory is empty, the JavaTest harness behaves as if the test suite was never run.