R Services - Mango Solutions

visualTest

Visualisation is important for understanding trends, identifying problems, and communicating findings. When we write code for a production environment, we need to be able to develop our code while being confident that our core functionality is still behaving as expected. Our code may have multiple features, and it is hard to check that we have not introduced regressions without an automated test suite. Our environment may not be static, and if changes in our dependencies introduce errors in our code, we also need to be alerted. However, graphics are complex objects whose contents may be device dependent. A human may visually be satisfied that the files tell the same story, but to a test suite, the files are not identical.

visualTest is an R package that performs fuzzy matching between two image files. A fingerprint summary is created for each file, and these are further summarized and compared. This allows minor differences between files (such as cross platform rendering) to be ignored. Only larger changes between the image output will cause a test failure. This greatly simplifies the testing process for graphics files.

An open development arm of visualTest is now available on GitHub (https://github.com/MangoTheCat/visualTest).