Setting up and cleaning the context for a test case or test suite
You can set up the environment and conditions required for running a test case, determine how to clean up test data at the end of the test run, and set pages on which to automatically run rules.
You can set clipboard pages, apply data transforms, load data pages, execute activities, create and load objects. All the referenced data pages, and data objects and user pages that were created during a test run will be automatically removed at the end of each run. To further clean up the clipboard, add steps to apply additional data transforms and execute activities. You can set up or clean up the clipboard if you are running a test for which the output or execution depends on other data pages or information.
For example, your application contains a data page D_AccountTransactionsList. This data page is sourced by a report definition or activity that loads the transactions of the logged-in customer, based on the account type for which the customer views transactions.
The customer number and account type that the customer selects are dynamic properties that are stored on the work page of the case. The report definition or activity retrieves these properties as parameters from the work page and filters the results as it obtains the results for the data page.
When you create a test case for D_AccountTransactionsList, ensure that one of the following conditions is met:
- The parameter properties are on the work page of the clipboard before running the data page test.
- Your data page has an activity or report definition that refers to the properties of another data page that is on the clipboard to filter the results.
The system always runs data transforms, activities, and strategies on the RunRecordPrimaryPage page, regardless of which page you chose when you unit tested the rule in the Run dialog box. The system also runs flows and case types on the pyWorkPage. To update the page with any information required to set up test data, click the Setup tab.
- Setting up your test environment
Configure which actions you want to run and which objects and pages you want to view on the clipboard before, during, and after the test is run.
- Cleaning up your test environment
After you run a unit test case or test suite, user and data pages used to set up the test environment and the parameter page are automatically removed by default. You can apply additional data transforms or activities to remove other pages or information on the clipboard before you run more test cases or suites.
Previous topic Viewing unit test suite run results Next topic Setting up your test environment