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

Creating a data page unit test

Data page unit tests are created by first running the data page rule, and then converting that run into a test.

  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 Flush all instances of this data page before execution 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. Click the Gear icon next to the data page test name to edit the test case details such as the identifier and context including the ruleset and applies to class.

Editing data page unit test details

  1. Click Create and open to view and edit the unit test case details. Click Create and close to create the unit test without opening it.
  2. If you choose to open the unit test case, you can edit the unit test case details and send parameters, and define the expected output.
  3. Optionally, edit send parameters for test case that require parameters to be specified before the test case runs.
  4. Define the expected output.
  5. Click Save. The test will be listed on the Test cases tab of the data page.

Related Topics Link IconRelated information