Configuring page assertions
Some rules, such as activities and data transforms, can create or remove pages from the system. You can create page assertions to determine whether or not a page exists after a unit test case runs. You can also assert if a property has an error and, if it does, what the message is so that you can validate that the message is correct.
You can configure page assertions for embedded pages, data pages, data pages with parameters, and embedded pages within data pages that either have or do not have parameter stop-level pages.
On the bottom of the Definition tab, click Add expected result.
In the Assertion type list, select Page.
In the Page field, enter the name of the page.
In the Comparator list, select the comparator that you want to use to compare the property with a specified value:
- To ensure that the page is created after the unit test runs, select exists. The assertion passes if the system does not find the page.
- To ensure that the page is removed after the unit test runs, select does not exist. The assertion passes if the system does not find the page.
- To ensure that the page has an error after the unit test runs, select has errors. The assertion passes if the system finds errors on the page.
- To ensure that the page is free of errors after the unit test runs, select has no errors. The assertion passes if the system finds no errors on the page.
- To ensure that the page has a specific error message after the unit test runs, select has error with message and then enter the message in the Value box or click the Gear icon to build an expression. The assertion passes if the page contains the complete error message.
- To ensure that the page has a portion of an error message after the unit test runs, select has error message that contains and then enter the message in the Value box or click the Gear icon to build an expression. The assertion passes if the page contains the words or phrases in the error message.
- Optional:
To add another page to the assertion, click Add pages, and then perform steps 3 through 4.
- Optional:
To add a comment, click the Add comment icon, enter a comment, and then click OK.
Click Save.
- Page assertions
You can configure page assertions to determine if a page exists on the clipboard or if a page has errors.
Related Content
Article
Converting unit tests to test casesPrevious topic Configuring list assertions Next topic Page assertions