If you have tests that fail, you don't have to wait until your test fully runs to begin debugging. Testim includes some tools to help you quickly debug your tests during runtime:
- Stop a test that is currently running
- Pause at certain problematic/interesting points and take a closer look.
- Run the test one step at a time
To stop a test from running:
- Click the Stop button on the action menu.recorded.
The test will be marked as failed and the last step not completed will be highlighted.
To pause a test currently running:
- Click on the "Pause" button in the action menu.
- To resume running the test, click the Play button in the action menu. The test will resume at the step where the test was previously paused.
If you are debugging a test one step at a time, you can control when each step of the test runs.
To run a test step-by-step:
- Click the drop down button next to the Play button and select Run locally step by step.
- Click the **Play Next Step" button on the action menu to execute the next step in the test.
Breakpoints will automatically pause the test at a specific step (before it runs).
To insert a Breakpoint in a test:
- Hover on an arrow between two steps and click the Toggle Breakpoint button.
This will display a breakpoint (pause symbol) between the steps.
You can add a breakpoint by using a keyboard shortcut (Ctrl/Cmd + B).
Sometimes when you are debugging a test, you don't want to run a test from the very beginning each time. Testim allows you to run a test starting from a specific step.
If you have steps in your test that are dependent on previous steps (e.g., logging into an application), starting a test in the middle of the steps may always cause the test to fail.
To run a test from a specific step:
- Hover on an arrow between two steps and click the Play from here button.
The test will begin running from the step after the selection.
Updated 5 months ago