ScenarioBuilder provides many tools to help you track down and fix issues in your script. This article discusses a variety of tools.
There are different tools that can help you investigate and fix failures in your scenario.
- Execution Report
- Execution Timeline
- Smart Image Configurator
- Debug Image
The ScenarioBuilder Execution Report is displayed after the scenario finishes playing. You can also find the Execution Report for your latest run by clicking on Run in the main menu of ScenarioBuilder, then clicking the View Report button.
The Execution Report will tell you the status of the scenario (success, fail). If it failed, it will tell you in which scenario or sub-scenario it failed, at which step it failed, and why it failed.
Once you know where it failed, then you can investigate why it failed by looking at what occurred up to that point. The Execution Timeline will help you with this.
From the ScenarioBuilder Execution Report, click View Execution Timeline to view the Execution Timeline. If you have already closed out of the Execution Report, you can view the Execution Timeline of your latest scenario run by clicking Run in the main menu of ScenarioBuilder. Next click View Report, and then View Execution Timeline.
The Execution Timeline shows:
- The time that each step was executed.
- A screenshot of the screen just prior to the step (click on the step to view screenshot).
- How long it took to find an image
- Which variable was used
- How many times a loop was performed
- The coordinates of a mouse click action
- If an “if” statement was true or false
The Execution Timeline will allow you to see where the scenario failed and determine if the failure occurred at that point or was it due to something that did or did not occur in a previous step.
Note: The mouse coordinates that you see in the script in ScenarioBuilder may be different than the mouse coordinates you see in the Execution Timeline if you select Use Anchor in the Mouse Move and Click action properties. This is because the coordinates in ScenarioBuilder are based on relationship to the image. When executed, the coordinates that appear in the timeline are based on the entire screen. See also: What is the Scenario Execution Timeline?
Smart Image Configurator
The Smart Image Configurator is ScenarioBuilder's built-in tool used to view, search, and modify images that are included in test scenarios. Using Smart Image Configurator to fix image failures is covered in the following article. See also: How do I use ScenarioBuilder Smart Image Configurator to fix Image Action failures?
The Debug Image tool is useful when you have Find Image actions with Move mouse and click actions or Click on Image actions in your scenario. This tool will provide you with a screenshot of the screen when the click occurred, and it will mark the spot where the mouse click occurred.
After you play your scenario, this red dot icon will appear to the far right of the Find Image or Click on Image step.
Click on the icon to open the screenshot. On the screenshot, the spot that the mouse click occurred will be marked with a red + and the step #.
Determining if the mouse click occurred in the correct spot or not will provide insight into where the failure in your scenario occurred and set you on the right path to fix the failure.