Partial Image Validation

Document created by DPM Admin Employee on Jul 18, 2017
Version 1Show Document
  • View in full screen mode

Setting Up the Clip for Partial Image Validation

Partial image validation is available for validation of selected portions of a view in both iOS and Android native apps.

  1. Open the test clip in which partial image validation will be performed.
  2. If screenshot validation is enabled at the target level, turn it off by unchecking Add verify screenshot during recording. If a change was made, click Save.

  1. With the device's TouchTest Agent active, click Record in the Clip Editor toolbar. When you do so, the Choose a Device Agent and Mobile App box appears with the clip's device agent/mobile app combination pre-selected.
  2. Click the Record button in the Choose a Device Agent and Mobile App box.

TIP: If screenshot validation is enabled on the Clip Editor, Etc (...) menu, uncheck Automatically validate screenshots.

  1. If a change was made, click Save.
  1. Select the app action to add a verifyScreenshot validation and click the Gear icon to invoke the Info Window (this can also be done in the lower panel Action Editor).
  2. Select the Validation tab and click the green Plus icon to add a validation form.

  1. Click the Command drop-down to add verifyScreenshot.

  1. Click into the verifyScreenshot's Locator field and invoke the Touch Locator.
  2. Click the Touch Locator icon in the Locator row to enter Locator mode. The blue Locator border appears in the app on the device.
  3. Select the view in the app until the Locator detail appears. For example, as shown below in the Stockfish, Chessboard view.

Selecting the Partial View

Next, we will perform the steps to select a custom, or partial, view. This custom view should be a region smaller than the width/height of the screen.

  1. Ensure that the mobile app is in the state you want to capture. For example, in the capture below no pieces have been moved and nothing has been selected (i.e. we are just cropping a portion of the Chessboard view before any moves are made).
  2. Do a long press until the blue border adjusts and the Locator box appears with a Custom view locator box.

  1. Use drag and pan actions to arrange all four corners (each of which is indicated by a blue dot) until the Custom frame is in the desired position.
  2. When ready, click the Up arrow in the Custom title bar to add the locator to the clip on your desktop client and exit Touch Locator mode. This will also exit Record mode in the Clip Editor.
  3. The screenshot will be populated into the Screenshot field in the Validation form.

Note: As with other TouchTest image validation, you can optionally assign a tolerance level for the image validation match. If the match doesn't fall within the specific range then the validation will fail.

  1. Save the test clip before exiting the Clip Editor.

When the test clip is played in a test composition, the validation will appear in Result Details with the result for the given app action. Maximize the Outputs section to get a better view.

 

If the partial image validation didn't pass, the verifyScreenshot (in the Result Details dashboard, Waits and Validations section will indicate so.

In the Output section the Diff tab is presented with a brown border around the offending portion of the screenshot.

Attachments

    Outcomes