Recording Test Cases for Standard and Web Applications

Note: Before you can record a test case, you have to configure the application that you want to test.

This functionality is supported only if you are using the Open Agent.

When you record a test case with the Open Agent, Silk Test Classic creates locator keywords in an INC file to create scripts that use dynamic object recognition and window declarations. With this approach, you combine the advantages of INC files with the advantages of dynamic object recognition. For example, scripts can use window names in the same manner as traditional, Silk Test Classic tag-based scripts and leverage the power of XPath queries.

  1. Click Record Testcase on the basic workflow bar. If the workflow bar is not visible, click Workflows > Basic to enable it. The Select Test Type dialog box opens.
  2. Select 4Test Testcase.
  3. Click OK. The Record Testcase dialog box opens.
  4. Type the name of your test case into the Testcase name field. Test case names are not case sensitive; they can have any length and they can consist of any combination of alphabetic characters, numerals, and underscore characters.
  5. From the Application State list box, select DefaultBaseState to have the built-in recovery system restore the default base state before the test case begins executing.
    • If you choose DefaultBaseState as the application state, the test case is recorded in the script file as testcase testcase_name ().
    • If you choose another application state, the test case is recorded as testcase testcase_name () appstate appstate_name.
  6. Click Start Recording. Silk Test Classic performs the following actions:
    • Closes the Record Testcase dialog box.
    • Starts your application, if it was not already running. If you have not configured the application yet, the Select Application dialog box opens and you can select the application that you want to test.
    • Removes the editor window from the display.
    • Displays the Recording window.
    • Waits for you to take further action.
  7. In the application under test, perform the actions that you want to test.
    For information about the actions available during recording, see Actions Available During Recording.
  8. To stop recording, click Stop in the Recorder. Silk Test Classic displays the Record Testcase dialog box, which contains the code that has been recorded for you.
  9. To resume recording your interactions, click Resume Recording.
  10. To add the recorded interactions to a script, click Paste to Editor in the Record Testcase window. If you have interacted with objects in your application that have not been identified in your include files, the Update Files dialog box opens.
  11. Perform one of the following steps:
    • Click Paste testcase and update window declaration(s) and then click OK. In most cases, you want to choose this option.
    • Choose Paste testcase only and then click OK. This option does not update the window declarations in the INC file when it pastes the script to the Editor. If you previously recorded the window declarations related to this test case, choose this option.
  12. Click OK. Silk Test Classic adds the recorded actions to the specified script file, and opens the file in the editor.