As in software development, there are times when you want to examine the behavior of your test in detail by executing it step by step. This is useful when you suspect errors in your tests or the services you are testing.
By using the Step-by-Step Run page, you can:
Add a breakpoint to test steps.
Run to that breakpoint.
View the current values of the ReadyAPI properties.
Working With the Details Panel
In the debug mode, you can run test execution up to the specified breakpoint. When ReadyAPI reaches a breakpoint, it pauses the test run and allows you to examine the test state and property values.
To set a breakpoint, click the BP column next to the desired test step in the Details panel.
While the test run is paused, the next test step to be executed is marked with the icon. To execute only this test step, click . Also, you can start the test run to the next breakpoint by clicking .
To temporarily disable a breakpoint, right-click the breakpoint you need and select Disable Breakpoint.
To remove a breakpoint, click in the BP column of the Details panel.
You can pause a test step at a breakpoint only if a certain condition is valid:
Right-click a breakpoint and select Breakpoint properties.
In the Breakpoint Properties dialog, select the Conditional check box.
Write a Groovy script that returns
false. When the script returns
true, ReadyAPI pauses the test run.
Note: If your script does not contain the
returnstatement, ReadyAPI refers to the result of the last operation.
Working With the Properties Panel
The Properties panel contains the test items’ properties and their current values. If a property value changes since the previous step, it becomes highlighted, and the asterisk (
*) mark appears near its parent item.
You can hide properties of test items you do not need. To do it, open the Filter View drop-down list and remove the selection from the properties of test items you want to hide from the panel.
Debugging Test Case Tutorial
Debugging Groovy Scripts