You are here: Reference > Rule types > Data Page Unit Test Case rules > Creating a data page unit test case

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.

  1. Click the Data icon in the Explorer panel to display the Data Explorer.
  2. Click Add new test from the drop-down menu to the right of the data page for which you want to create a test.
  3. Select the thread in which you want to run the data page in the Thread field.
  4. In the Parameter section, enter the value (if any) to pass to the data page.
  5. Select the Flush all instances of this data page before execution check box to delete any existing instances of the selected data page.
  6. Click Run.
  7. Note: Click Clipboard to view the Clipboard. Click Trace to debug the data page using the Tracer tool.

  8. The Results section lists the properties and the values on the data page. Click the property name to view the property details.
  9. Click Convert to Test. A new Create Unit Test Case tab displays in the main Designer Studio window.
  10. Close the Run Data Page dialog box.
  11. 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.
  12. 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.
  13. Optional: Apply additional data transforms or activities to clean up the clipboard in the Setup & Cleanup tab.
  14. 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.
  15. Complete one of the following steps.

    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.