Snapshots

TruClient generates snapshots of interactive steps during recording and replay of a script. This topic describes how to work with snapshots.

About snapshots

TruClient generates snapshots during recording and replay according to the snapshot generation settings.

You can configure snapshot generation during recording and replay by clicking the General Settings button and selecting the Interactive Options tab. For details, see TruClient General Settings.

TruClient can also generate snapshots during load mode according to your specifications in the Run-Time Settings.

The following table summarizes snapshot behaviors:

Mode Snapshot generation Snapshot location Snapshots folder structure
During Record

Snapshots are created in memory.

N/A N/A
Stop Record N/A
  • (IE) Snapshots are saved under the snapshots folder.
  • (FF) Nothing is saved.
N/A
Save script in Interactive Mode N/A

Snapshots are saved under the snapshots folder.

Record folder

During Interactive Replay

Snapshots are created for Play From This Step and Play Until This Step.

Snapshots are not created for Play this step and Play selected step.

  1. When starting replay, TruClient deletes the Result\Interactive folder.

  2. The Result\Interactive folder is created only if there is at least one snapshot to create (for any action or Library). Snapshots are created in one of the following folders according to the location of the step:

    • Results\Interactive\<browser name>\<block Id>\ I<interation number for replay block>(init and end block do not have iterations)\<action name>\

      where:

      <browser name> can be IE, Firefox, or Chromium

      <block Id> can be IB, RB, or EB (init, replay, or end block)

      Example:

      results\interactive\Chromium\RB\I1\Action

    • ResultModInteractive\<LibName> - for steps located in the library

  3. When Always generate snapshot is selected in settings, all snapshots are saved.

  4. When Snapshot on Error is selected in settings, only the snapshot of the step with error is generated. It is generated with the suffix -error.png. In addition, the following actions are performed:

    1. TruClient duplicates the PNG file created by default and places it in one of the following folders naming it t[X].png:

      • Result\Interactive\IterationInit – for steps located in the Init action.
      • Result\Interactive\IterationX - for steps located in the Action action.
      • Result\Interactive\IterationEnd – for steps located in the End action.
    2. TruClient also creates a t[X].inf file pointing it to the t[X].png file.

Note: This is performed in Interactive replay even though it has no use in the Interactive snapshot viewer.

Replay folder

 

Back to top

Configure snapshot generation

  1. Select the button to open the General Setting dialog box.
  2. Select either the Interactive Options or Run-Time Setting tab.

    The Interactive Options tab contains settings for scripts you are developing.

    The Run-Time Setting tab contains settings for load mode.

  3. Select options on both tabs for Snapshot generation:

    SettingOptions Description
    Record snapshot generation
    • Never generate snapshots.
    • Always generate snapshots. This is the default.
    • Maximum step level to generate snapshots. The default level is 1.
    Replay snapshot generation
    • Never generate snapshots.
    • Generate snapshots on error only.
    • Always generate snapshots. This is the default.
Back to top

View a snapshot

  • Double-click a snapshot in the Development Window to display it in a new browser tab.

  • You can view snapshots in the TruClient snapshot viewer.

    Click the button in the Development Window. The snapshot viewer displays the snapshot in the right pane and adds the following elements:

    Previous/Next. Navigates to the snapshot for the previous or next step. The corresponding step is highlighted in the script.

    UI ElementDescription
    RecordingDisplays snapshots that were taken for a specific step during recording.
    Interactive ReplayDisplays snapshots that were taken for a specific step during interactive replay.
    IterationDisplays snapshots for a specific iteration during interactive replay mode.
    Play Slide ShowDisplays snapshots as a slide show.
    Stop Slide ShowStops the slide show.

    View

    UI ElementDescription
    Single

    Displays the snapshot for a single step.

    Compare Splits the screen so you can compare snapshots from different modes. Use the Snapshot View buttons in each pane to select which snapshots to view. Click the Synch button to synchronize scrolling between the panes. The snapshot error icon indicates that the snapshot is not current for the step.
    ThumbnailDisplays the snapshots in thumbnails view.

Back to top

See also: