Setting Up a Visual Test to Automatically Respond to Errors Using the Test Logic Designer

You can configure visual tests to anticipate and automatically respond to playback errors. Set up visual tests to handle errors within its own steps, or to open another visual test containing steps that provide specific error handling instructions. To set up a visual test to handle errors, use the Test Logic Designer wizard.

  1. Open the visual test in which you want to set up error handling.
  2. Select the step that precedes where you want to create the error handling step.
  3. Choose Insert > Test Logic > Error Handling. The Test Logic Designer wizard opens to the Welcome page.
  4. Click Next. The Select a Logic Type page opens.
  5. Click The error during playback of the visual test (Playback Error) and then click Next. The Build the Error Handler page opens.
  6. From the Whenever a playback error occurs take the following action list, select an action from one of the following choices.
    Show default playback error dialog
    Displays the Playback Error dialog box when a playback error occurs, which is used to determine a playback action to take when an error occurs. Use the Playback Error dialog box to enter debug mode to diagnose errors in a visual test.
    End playback of current visual test
    Ends visual test playback when an error occurs. No other steps in the visual test play back. When playback ends, the Playback Complete dialog box appears, which determines the action to take when playback completes.
    Retry playback of the step on which the error occurred
    Plays back the visual test specified in the Asset property, then attempts to execute the step that caused the error. If no visual test is specified in the Asset property, then playback simply attempts to re-execute the step that caused the error. You can specify the number of replay attempts in the Number of retries property. The default number is 5. If the step execution is not successful when the specified number of retries is reached, a playback error is generated.
    Resume playback at the next step
    Plays back the visual test specified in the Asset property, then attempts to execute the step immediately after the step that caused the error. The step that caused the error is not re-executed.
    Go to a label
    Plays back the visual test specified in the Asset property, then navigates to the predefined Label step specified in the Label property and continues playback. Using Go to allows that visual test to skip steps that could potentially contain failures similar to the one that occurred during playback, and navigate to another section of the test.
    First playback another visual test
    Plays back a different visual test, which you specify, and then you specify what action happens next. To determine what occurs after the alternate test runs, choose to end the test, retry the step where the error occurred, go to a label, or resume the original test where the error occurred.
  7. If you specify Go to a label, from the Select a label to Go to list box, select the label to which you want the error handler to navigate.
  8. If you specify First playback another visual test, perform the following steps.
    1. Click <Insert a Visual test>, choose the asset that you want to playback, and then click OK.
    2. From the And then list box, select which action you want to occur next. If you specify Go to a label, from the Select a label to Go to list box, select the label to which you want the error handler to navigate.
  9. Click Next. The Summary page shows the test step description for the new error handling step.
  10. Click Finish.