According to the definition, Negative testing is a process of testing an application to ensure that the application is according to the requirements and can handle the unwanted input and user behavior. As per Wikipedia negative testing is also known as failure testing.

In the same manner visual negative testing is the process of validating mismatches on a specific location in the image. Imagium is the first and at the time of writing it is the only AI powered visual testing tool to allow Negative Visual Testing tool.

Negative testing is extremely important and Visual Testing is incomplete without it. It can be used to validate various aspects which were previously the blind spots.

  • Validate any expected unknown change in the image
  • Validate the loading of graphs
  • Validate the expected unknown differences in the heat maps
  • Validate the expected unknown changes in PDF’s
  • Validate the expected changes for localization testing

Various features around negative Visual testing provided by Imagium are as following

  • Detect changes in the entire image
  • Detect change in only a specific region of the image
  • AI engine to prevent false positives
  • Specify the target region for negative testing via GUI marker
  • Specify multiple target regions
  • Specify the target region for negative testing via API’s at runtime
  • Exclude a region within the target region
  • Ignore the changes of size smaller than given size
  • Run negative and positive validations in the same test case
  • Test change on screen for some events
For negative testing, the step will pass if there are differences at a specified location of two images. The following example demonstrates on how you can validate a change in a graph for only specific region. This would not have been possible to achieve using standard Visual testing.
Select a target region in the baseline to expect a change in only 2021 region
The test shall fail if the graph is not populated for 2021 (Target region)
Th test shall pass if the graph is populated for 2021

For more information on negative testing checkout the details here