Understanding how to debug executions using QaSCRIBE
Functions available for troubleshooting/debugging executions
QaSCRIBE provides various functions that help you in efficiently debugging the failures occur during local test executions. You can:
- Pause execution
- Start execution from a specific instruction
- Place Startpoint and Breakpoints
- Execute a single test instruction
If you would like to review the results while the execution is in progress or you want to perform some actions that are not part of the test script, before continuing with further execution, you can use this pause the execution.
Pause button can be seen in the "Execute & Debug" tab. A paused execution can be continued from where it is paused without having to restart the test.
If for some reason the application tab gets closed either when the test script is in execution state or while it paused, the test will be aborted.
While working on a test script or debugging an execution, you may have a requirement to start execution from a specific instruction in the test script instead of starting from the first instruction. In that case, the "Toggle Startpoint" option available in the Actions field will come handy here.
Click on the round icon in the Actions field, shows three options. The third option in the pull-down is the Toggle Startpoint. By selecting the toggle option for the specific instruction in the test script, you can choose to start execution from that instruction.
Once done you can select the same option to remove the selection. Please note that for execution you can only have one start point. And the test instruction that you set the start point can be any test instruction and does not necessarily have to be the first instruction of a test script.
You can select the instruction that you would like to place the breakpoint by clicking on the round icon in the Actions field of the corresponding row. This will pull down a menu and the second option "Toggle Breakpoint" is to be selected.
Once you save the script with this option selected executing a Run Definition or Scenario that the test script is part of, will have the execution paused at the selected instruction. And this will affect the local executions that are triggered by the user who turned the option ON. Any local executions performed by other users will not have any impact.
To turn off the selection, select the same entry from the pull-down.
You can set one or more breakpoints within a test script. If you have more than one breakpoint, the execution breaks (pauses) at the first test instruction that has a breakpoint. When you continue the execution, it executed the test instructions up to the next breakpoint and stops, and this process continues until you reach the end of the test execution.
You may run into a scenario wherein you are in the process of debugging an execution or making changes to a locator in instruction and would like to test if the change works. In that case, executing a single instruction is what you are looking for.Clicking the round icon in the Actions field will pull down a menu wherein the first option is "Execute Single Instruction". Select this instruction and the instruction would be executed in the tab that you have the application open.
If the instruction chosen is nth command in the instruction set, execution results will show all the n-1 commands as skipped and then print the result of the instruction execution.
While debugging a test execution, you may run into a case where you would like to check if a specific element is found or not. It so happens that the locator for an element has changed and the instruction fails during execution.
Find Element comes handy in such situations. When you click on this icon, the corresponding element is highlighted in the application tab. If the element you are trying to find is not in the viewport then QaSCRIBE will auto-scroll to the element. This may not work if there is lazy loading and the element is not loaded to the DOM.
View Multiple Locators within a command
When you record through QaSCRIBE, you would see multiple locators getting recorded for a single element (id, CSS, XPath, etc.;).
Or if you add any locator to the existing ones, you will be seeing multiple locators for that command. Perform the below actions to view all the locators available for any command:
1. Identify the command and double click on it to see the expanded view
2. Click on "Premium Editor" icon
3. Click on the navigation arrows to see the locators
The same procedure is applicable when the test script is accessed in View/Edit mode.