Creating a data page unit test
Create a data page unit test by first running the data page rule and then converting that run into a test. Complete the following steps.
- Click the Data icon in the Explorer panel to display the Data Explorer.
- Click Add new test from the drop-down menu to the right of the data page for which you want to create a test.
- Select the thread in which you want to run the data page in the Thread field.
- In the Parameter section, enter the value (if any) to pass to the data page.
- Select the Flush all instances of this data page before execution check box to delete any existing instances of the selected data page.
- Click Run.
Note: Click Clipboard to view the Clipboard. Click Trace to debug the data page using the Tracer tool.
- The Results section lists the properties and the values on the data page. Click the property name to view the property details.
- Click Convert to Test. A new Create Unit Test Case tab displays in the main Designer Studio window.
- Close the Run Data Page dialog box.
- Optional: Click the Gear icon next to the data page unit test name to edit the test details such as the identifier and context including the ruleset and applies to class.
- Optional: Apply one or more data pages, data transforms, or activities set up the clipboard before running a test in the Setup & Cleanup tab. You can also use activities to create any required test data, such as work or data objects.
- Optional: Apply additional data transforms or activities to clean up the clipboard in the Setup & Cleanup tab.
- Optional: Configure property assertions in the Expected results pane. Before you click Create and open or Create and close, you can configure property assertions only. After you click either button, you can configure all types of assertions.
- Complete one of the following steps.
- Click Create and open to view and edit the unit test case details. Optionally, you can:
Edit the data page unit test details.
Edit send parameters for test case that require parameters to be specified before the test fruns.
Add assertions, set up, and clean up the clipboard.
- Click Create and close to create the unit test without opening it.
Note: After you click either button, the system generates the expected run time assertion. The default value of the expected run time is the time taken by the data page to fetch results when the test was first run. The system compares this time with the run time of any future tests. You can change this value.
Open topic with navigation