Image - test subject

  • on all platforms

The image test subject represents a comparison of referencing image uploaded to Image repository. Be aware that images are compared in grayscale.


This test subject can be evaluated only if image capture is configured.

In Test editor:

Check that the app logo is displayed in correct position

In the JavaScript API:


// region has rectangle shape, in %, distance from left and top of the screen, width and height
await suitest.assert.image('app-logo').inRegion([40, 10, 20, 10]).accuracy(suitest.ACCURACY.HIGH).visible().timeout(2000);

Image comparison currently works reliably only when capturing the image over the HDMI with the WingBox. If you want to use the Suitest Camera app or a USB camera, check the stream to ensure there are no reflections on the screen and that the content is in focus through the corresponding lens. Additionally, make sure that you set up high accuracy and define a region to achieve the highest possible reliability.

Assertion location

Suitest can assert on images across the whole screen or only in a specific region.

Region is a rectangle defined by the following 4 parameters (all in % of the whole screen):

  • left - horizontal distance from the left side of the screen
  • top - vertical distance from the top side of the screen
  • width - width of the region
  • height - height of the region

Defining the region

Accuracy

Suitest allows using several different image capture sources. They all differ in the capture quality, therefore in some cases it is impossible to make high quality comparison. Depending on the source, you should use appropriate accuracy level.

Accuracy levels:

  • Low
  • Medium
  • High