Debugging a Test Script

Start the debugger to debug your test scripts.

Note: You cannot modify files while you are using the debugger. To fix a problem in a file, stop the debugger by clicking Debug > Exit in the Silk Test Classic menu.
  1. To debug a script that is not currently active in the editor, click File > Debug.
    • To debug the active script, click Run > Debug. Silk Test Classic enters the debugger and pauses without setting a breakpoint.
    • To debug a specific test case from the active script, click Run > Testcase. Then select a test a test case from the Run Testcase dialog, and click Debug. Silk Test Classic enters the debugger and sets a breakpoint at the first line of the test case.
    • To debug an application state, click Run > Apllication State. Then select an application state from the Run Application State dialog box, and click Debug. Silk Test Classic enters the debugger and sets a breakpoint at the first line of the application state definition.
    • To debug a plan file, call the test cases in the plan file from a main() function and debug the plan file from there from there. You cannot use the debugger from plan files (*.pln).
  2. If you want to debug a script that is not currently active in the editor, select the script file from the Debug dialog box. Silk Test Classic enters the debugger and pauses without setting a breakpoint.
  3. Click Open. Silk Test Classic performs the following actions:
    • Opens the selected script file in debugging mode.
    • Marks the current line, which is the next line to be executed, with a triangle.
    • Changes the menu item from Run to Continue.
    • When script execution completes, a message box displays indicating that the script has terminated.

During script execution, Silk Test Classic displays a transcript window, which is similar to the results window. Unlike the results file, however, the output from debugging a script is not saved in a file, there are no statistics, and all the information is expanded automatically. The transcript window contains the script name, the test case names, and a list of the errors encountered and their line numbers. At the bottom of the transcript window is a text field in which you can enter any statement to execute. The results of each statement you execute appear in the transcript window.

Special debugging commands are available.