Using the Testing Framework
|Getting Started||Assigning TestIDs|
|Running Tests with the Notebook Interface||Notebook Conversion|
|Working with Test Results||Directly Running Tests in a Notebook|
|Generating .wlt Files|
If messages are expected to be generated upon running the tests, add them using the Add Messages button. You can also add options to the individual tests such as MemoryConstraint, SameTest, TestID, and TimeConstraint using the drop-down to the right of the Add Options button.
Clicking the Run button will evaluate all tests in the testing notebook. The test results are inserted into the individual tests as they are evaluated, and upon completion of the test run, a summary of the test report is inserted at the top of the notebook. The following notebook displays the four possible test outcomes: Success, Failure, Message Failure, and Error. The Clear Test Results button may be used to clear test results from the notebook.
The test report summary details the total number of tests run, as well as the number of successes, errors, failures due to wrong results, and failures due to messages. Additionally, a summary bar depicts the test results and has two modes for ordering the test results: by status and by sequence. When the total number of tests in a testing notebook is 50 or less, every individual tab in the summary bar links to its appropriate test. In the lower-right corner, there are two buttons that find the previous and next failed test relative to the cursor position.
You might want to convert a notebook of inputs, messages, and outputs into a test notebook. With that notebook being the input notebook, click on Window ▶ Toolbar ▶ Testing. A docked cell will then be added to the top of that notebook. Then click on the button Convert to Testing Notebook.
Single tests may be directly run using VerificationTest.
Multiple tests may be directly run using TestReport.