Debugging Errors

After Silk Test Workbench encounters a playback error, the Silk Test Workbench Playback Error dialog box opens and provides the option to enter Debug mode. In Debug mode, playback is suspended, which allows you to diagnose and fix any playback errors using the Silk Test Workbench debugging features.

In this section of the lesson, you will learn how to debug the error that occurred during playback of the modular test in the previous section.

  1. From the Playback Error dialog box, click Debug.

    In Debug mode, playback is suspended. This allows you to fix the error by either editing the properties of the step incurring the error, deleting the step, disabling the step, or copying and pasting a step from another visual test before resuming playback.

    Silk Test Workbench enters Debug mode and displays the AddAccount visual test with the step incurring the error highlighted in yellow.
  2. Choose Edit > Enable/Disable to disable the step Select button 'id=signup:continue'. By disabling this step, you prevent the error from occurring the next time you play back the test. The step text turns grey and italicized indicating that it is disabled.
  3. Click Playback on the toolbar. The Playback Error dialog box opens.
  4. Click Debug.
  5. Choose Edit > Enable/Disable to disable the step Select button 'id=logout-form:logout'. This error occurs because the test is looking for the Log Out button on the Home page, but since the Sign Up Continue step is disabled, the button does not display on the page. We will fix this error later in this tutorial.
  6. Choose Debug from the menu. The following Step commands that appear at the top of the menu allow you to control the step execution:
    Step Into (F8)
    Executes playback one step at a time. Step Into is useful to trace through each step, and steps into other visual tests or scripts that are inserted into the visual test being played back. Each inserted visual test or script is also executed one step or line at a time.

    Step Into is useful for detailed analysis of a test, and lets you see the effect of each step on variable usage and test application interaction.

    Step Over (Shift + F8)
    Executes an entire visual test or script inserted into another visual test as if it were a single step. Use Step Over when playback is in debug mode for a step that plays back a visual test or script. This plays back the inserted visual test or script in its entirety. Once the inserted visual test or script plays back in its entirety, playback suspends in debug mode at the next step in the original visual test.

    Using Step Over at a step other than one that plays back another visual test or script has the same effect as using Step Into. Only the next step executes before playback suspends and re-enters debug mode.

    Step Out (Ctrl + Shift + F8)
    Executes all remaining steps in a visual test or script being played back from another visual test, then suspends playback at the next step in the original visual test.

    Use Step Out when playback is suspended at a step in a visual test or code line that has been inserted in another visual test, and you want to playback the remaining visual test or script and return to the original visual test. When playback executes the remainder of the inserted script or visual test, it suspends and re-enters debug mode at the next sequential line in the original visual test.

    Run To Cursor (Ctrl + F8)
    Allows you to select a step where you want playback suspended. This allows you to "step over" selected sections of a visual test or script.

    Use Run To Cursor to playback the visual test or script and stop playback at a point just before a run-time error occurs. This lets you stop playback at a specific line or statement without having to insert breakpoints. Once playback stops, you can continue using one of the other debug options.

    Run From Cursor
    Plays back the visual test from the currently selected test step.
  7. Choose Step Out. This command executes the remaining steps in the AddAccount visual test, and then suspends playback in the next step of the AutoQuote visual test. After selecting Step Out, Silk Test Workbench displays the home page, which is the last step in AddAccount, and suspends playback. Silk Test Workbench then opens AutoQuote in Debug mode and highlights the next step.

Next, you learn how to monitor the values of variables used in the visual test.