- Get your data to the state you require (we recommend also taking a back up).
- Create a Test Environment in Work With Test Environments specifying the libraries that make up the environment. When you perform tests in this environment if a specific library list is to be used, define this with F7.
- Define and set at least one Checkpoint, and set this to identify to TestBench the current state of the environment.
- Against your Test Case, change the Data Protection option to *ENV (in the Test Options window) and name the environment you are using.
- Probably, you will want to remove any Manual References against the Test Case.
- Perform your first batch of tests.
- Create and set a new Checkpoint to capture this point in time.
- Continue testing and creating Checkpoints as required.
- The test results will include file and data area effects and hence Data Rules may also be checked.
- If you need to reset the database at any time, use the rollback option against a selected Checkpoint.
Three commands for use with Environment Protection are also available so that for example, these functions can if required be incorporated into User Exits in a Test Case or added as Test Case Processes:-
- Scan_IT – Scan a Test Environment
- Mark_IT – Set a Checkpoint
- Roll_IT – Issue a rollback to a Checkpoint
There are two Test Case User Exits which monitor for the rollback command, BR (Before Rollback) and AR (After Rollback). These enable the specified user processing to be run every time the ROLL_IT command is executed during the test.