Saved Tests
A saved test keeps a test's values, its expectations and its last run, so anyone can run it again later. Saved tests are how a team checks that a rule still does what it should: before a new version goes live, after a source changes, or at any time. A test belongs to the rule version it was saved with, and it can be run again against any version of that rule's source.
Saved tests use these parts of the Rule Repository:
The Save Test dialog, opened by Save Test... in the Test dialog or the Test Result dialog. It has three boxes: Test Name (required; names do not have to be unique), Test Description and Test Internal Note.
The Tests grid, opened by the Tests tab at the top of the screen. It lists every saved test with these columns:
| Column |
What it shows |
| ID |
The test's number |
| Name |
The test's name. Hover over it to see its description. |
| Rule and Rule Version |
The rule and the version the test was saved with |
| Source and Source Version |
The source and the source version it runs against |
| Status |
Ran when the last run finished, Error when it did not, Not Run when the test has never been run |
| Result |
The rule's result in the last run: True or False |
| Test Type |
Exploration or Expectation |
| Tested By and Tested On |
Who ran the test last, and when |
The filters over the grid: Filter by name..., All rules..., All sources..., All statuses..., All results..., All test types..., All testers... and Filter by Tested On..., and Reset to clear them all.
The Test dialog that opens when you click a test's row, titled Test: followed by the test's name.
Saving a Test
- Run the test in the Test dialog (see Testing Rules), or open it without running it.
- Click Save Test..., in the Test dialog or in the Test Result dialog. The rule is checked first: an empty or unfinished rule cannot be saved with a test.
- Type a Test Name. Optionally, add a Test Description (what the test checks) and a Test Internal Note (a working comment for your team).
- Click Save Test. The line at the top of the dialog now names the test.
A test is saved against a rule version. If the Rule Editor holds a draft or a new rule, save it as a version first; Save Test... tells you so when you hover over it.
The test keeps its own values. If they came from a value template, later changes to the template do not change the test.
Every later Save Test... in the same dialog updates the same test. To make a second test, start a new one with + New and New Test..., or with a Test... button.
Finding a Test
- Click the Tests tab.
- Use the filters to narrow the list. For example, select Not Run in All statuses... to find tests nobody has run yet, or Expectation in All test types... to see only tests that check results.
- Click a column heading to sort by it.
Other screens lead here too. The Not Run counts in the Source Objects, Source Versions, Rules and Rule Versions grids, and the Not Run bar on a dialog's Stats tab, open the Tests grid filtered to that object's tests that have not been run.
Running a Saved Test Again
- Click the test's row in the Tests grid. The Test dialog opens at Step 2 with the test's values and expectations.
- Click Run.
- The result is recorded on the test as its last run. If you change values before running, nothing is recorded until you save the test with Save Test....
To run many tests at once, see Running Tests in Batches.
Changing a Saved Test
- Open the test from the Tests grid.
- Change its values, its expectations or its test type.
- Click Run to try the changes, then Save Test.... The dialog shows the test's name and description; a note you type is added as a new note.
Deleting a Test
- Open the test.
- Click Delete Test. A confirmation shows what goes with the test.
- Click Next, type the word delete and click Delete. The test and its notes are deleted, and the Test dialog closes.
Delete Test stays off until the test has been saved. See Deleting.