IDE & Navigation
Properties & Tools
You can have TestOptimal take a screen snapshot when MBT execution encounters errors or failures.
The difference between errors and failures are that the errors are the result of runtime programming error or system error which typically would cause the model execution to abort.
Failures are typically the result of finding a defect when the condition specified for <assert> tag evaluates to false.
The following example mScript codes will instruct TestOptimal to take a screen snapshot when there is an error or failure:
<mbt> <script type="onException"> <action code="$snapScreen()"/> </script> <script type="onError"> <action code="$snapScreen()"/> </script> </mbt>
Screenshots are stored in snapscreen folder in each model folder. The snapshot files will accumulate over time and need to be cleaned up. There are 3 ways to clean up these files: