Advanced editing and validation of result pages
When using Automated Unit Testing and test cases for regression unit testing, you can specify validate rules to check the values of properties when the test case is played back.
For example, if you want to check that a property value always lies in the range between $50 and $100 when a particular test case is run, you can change the property value that was saved when the test case rule was first created and set the value to a validate rule. When the test case runs, if the resulting value satisfies the validate rule, then the test case status is reported as successful. If the value does not satisfy the validate rule, then the test case is reported as unsuccessful.
This method is typically used for flow test cases, and usually for those properties that are related to time-based values which have different numeric values every time the flow runs. Using validation is an alternative to specifying that differences encountered during the playback of the flow test case should always be ignored for such properties. Instead, by using the validate rule, the test case run is reported as successful as long as the property value adheres to the validate rule.
Use the test case's rule form to specify validate rules for properties in the test case.
To edit the result pages of a test case:
- From the Rules by Type explorer, select SysAdmin > Test Case. Choose a test case rule from the list.
In V6.1, the first step is different. To open a test case rule form in V6.1:
- Open the Automated Unit Tests gadget by selecting > Application > Automated Unit Testing > Automated Unit Tests.
Unit Test Casesto display the current application's test cases.
- Right-click on the test case to open the context menu, and select Open.
The rest of the steps in this article are the same for V6.1.
- To begin editing the result pages of the test case, select the Results tab of the test case and click Show Result Pages. The ResultingPage Viewer window opens.
- In the ResultingPage Viewer window, navigate to the primary page of the step you want to edit and select Action > Update Page.
- The Update TestCase Page displays a list of all properties and their values for that step in the test case. From here you can change the value of each property or use a validate rule to test the value when the test case runs.
To edit the value of a property, highlight the value of the property and input a new value or a validate rule. For a validate rule, use the following syntax:
$ [Name of Validate rule]
- Once you have finished editing the result pages of the test case, click the Update Page button to update the new property values. Close the ResultingPage Viewer window.
- Save the test case rule form.