Recording a Test Case With the Classic Agent

When you record a test case with the Classic Agent, Silk Test Classic uses hierarchical object recognition, a fast, easy method to create scripts. However, test cases that use dynamic object recognition are more robust and easy to maintain. You can create tests for both dynamic and hierarchical object recognition in your test environment. Use the method best suited to meet your test requirements. You can use both recognition methods within a single test case if necessary.

  1. Enable extensions and set up the recovery system.
  2. Click Record Test Case on the Basic Workflow bar. If the workflow bar is not visible, click Workflows > Basic to enable it.
  3. Type the name of your test case in the Test case name text box of the Record Test Case dialog box. Test case names are not case sensitive; they can be any length and consist of any combination of alphabetic characters, numerals, and underscore characters.
  4. Select DefaultBaseState in the Application State field to have the built-in recovery system restore the default BaseState before the test case begins executing. If you chose DefaultBaseState as the application state, the test case is recorded in the script file as: testcase testcase_name (). If you chose another application state, the test case is recorded as: testcase testcase_name () appstate appstate_name.
  5. If you do not want Silk Test Classic to display the status window it normally shows during playback when driving the application to the specified base state—perhaps because the status bar obscures a critical control in the application you are testing—uncheck the Show AppState status window check box.
  6. Click Start Recording. Silk Test Classic:
    • Closes the Record Test Case dialog box.
    • Starts your application, if it was not already running.
    • Removes the editor window from the display.
    • Displays the Record Status on Classic Agent window.
    • Waits for you to take further action.
  7. Interact with your application, driving it to the state that you want to test. As you interact with your application, Silk Test Classic records your interactions in the Test case code field of the Record Test Case dialog box, which is not visible.
  8. To review what you have recorded, click Done in the Record Status for Classic Agent window. Silk Test Classic displays the Record Test Case dialog box, which contains the 4Test code that has been recorded for you.
  9. To resume recording your interactions, click Resume Recording in the dialog box. To temporarily suspend recording, click Pause Recording on the Record Status for Classic Agent window.
  10. Verify the test case.