Table of Contents

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.

  1. From the Records Explorer, click Data Model > Data Page.
  2. Select and open one of the data pages.
  3. Select Actions > Run.
  4. In the Run Data page dialog box, select a Thread, set the parameters for the data, and then click Run.

Results

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 Convert to test.

  1. Add a description.
  2. Select the check box next to the properties to include in the test.
  3. Select comparators and enter values for each property, if necessary.
  4. Enter a value, in seconds, for the expected run time.
    If the test does not run within the specified run time, the test fails.
  5. Click Create and close or Create and open to save the unit test case.

The Unit test case configuration page

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 Run selected.
  • 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 Run selected.
  • Directly from the test case rule itself – Select Run from the Actions menu. Click View summary in the header to view the detailed results.
  • The Test cases tab of the data designer.

Results

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.

Suggest Edit

71% found this useful


Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.