CleanUp Scenarios are important every time to keep the test environment clean before each test execution. If a test scenario fails, the collection of recovery scenario will trigger if created any. If the recovery scenario fails. The clean-up scenarios will be triggered, and it can include post execution steps like close the applications to make the next test case executable.
CleanUp Scenarios are alternate scenarios that Tricentis Tosca executes if Recovery fails, i.e. if the TestSteps in your Recovery Scenarios don't return a positive result.
The goal of Recovery is to fix failing TestStepValues or TestSteps by employing "corrective" TestSteps. CleanUp Scenarios, on the other hand, are geared towards resetting the environment so that the next TestStep has a chance of being successful.
For instance, if your Recovery Scenario closes a browser tab and reopens it, a possible CleanUp Scenario could be:
log out of site
close and reopen browser
navigate to the page
log in
Create a CleanUp Scenario
Right-click a *** Recovery Scenarios *** folder and select Create CleanUp Scenario(brush icon) from the mini toolbar.
Determine what Tricentis Tosca should do if Recovery fails. To do so, add TestSteps to your CleanUp Scenario. You can either use existing TestSteps, or create them via (TestCases, Folders within TestCases, TestSteps, TestStepValues, Reusable TestStepBlocks, Recovery Scenarios ).
CleanUp Scenarios during execution:
You create your CleanUp Scenarios in the TestCases section. Tricentis Tosca automatically applies them during execution. A CleanUp Scenario is successful if all TestSteps therein return a positive result.
If a *** Recovery Scenarios *** folder contains more than one CleanUp Scenario, Tricentis Tosca processes them top-to-bottom.
If none are successful, Tricentis Tosca processes the CleanUp Scenarios on the next-higher level. If there are none, or if none are successful, Tricentis Tosca moves on to the next-higher level until there are no more levels left.