Creating a data page unit test
Data page unit tests are a way to validate that application data is loaded correctly. It is important to validate data page functionality when changes are made to a data page or rule form. Testing data pages ensures acceptable performance and that no existing functionality has been broken.
Starting a data page unit test
Before you begin testing, you must configure your application for automated testing. See Automated data page testing: application setup.
You can access a data page in your application from the Records Explorer, the Data Explorer, or data designer.
- From the Records Explorer, click .
- Select and open one of the data pages.
- Select .
- In the Run Data page dialog box, select a Thread, set the parameters for the data, and then click Run.
The Results section of the data page run dialog box displays the properties and their associated values.
Ensure that the data page output is correct based on the parameters that you entered, and then click.
- Add a description.
- Select the check box next to the properties to include in the test.
- Select comparators and enter values for each property, if necessary.
- Enter a value, in seconds, for the expected run time.
If the test does not run within the specified run time, the test fails.
- Click Create and close or Create and open to save the unit test case.
The Unit Test Case configuration page
Running a Data Page Unit Test
After a data page unit test is created, you can access and run it from several places:
- The data page unit test landing page – Select the check boxes next to the name of the unit tests that you want to run, and click .
- The Test cases tab of the data page – Open any data page, and click the Test cases tab. Select the check boxes next to the name of the unit tests that you want tor run, and click .
- Directly from the test case rule itself – Select from the menu. Click in the header to view the detailed results.
- The Test cases tab of the data designer.
When the test case is open in Designer Studio, you can view the results in the header. Click View details to view the detailed test results, which contain a list of errors and unexpected differences. The table of unexpected differences displays the property, the comparator, the expected value, and the actual value. You can also view detailed results by clicking the result value on the landing page.
Test results are also displayed in the Test cases tab of the data page details. Click the name of the test result that you want to view to open that test.