Using Prior Status as a Run 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.

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 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 Filtered out folder folder and Test Filtered Out test icons.

However, when using Prior Status in combination with the Current Configuration view filter, you must remember that during a test run, when their results no longer match the prior status filter, the test tree changes the test and folder icons to gray, filtered out Filtered out folder folder and Test Filtered Out test icons.

Example:

You only want to monitor those tests in a test suite that had "failed" results. You 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 "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.