Over the last 14+ months I’ve been very fortunate to be asked to speak all over the UK, Europe and in the USA about visual testing. The feedback on my sessions have been really positive but the questions at the end of the session are almost always about problems which may be faced when using visual testing to test a web application.
Over the last two months I’ve come across a few other really cool ways which you can use visual testing to possibly start writing automated checks for things you wouldn’t neceessarily think about writing checks for and so I thought I’d write a quick post to summarise these different ways.
PDFs / Documents
In the majority of my talks (you can find a link to some of the videos here) I talk about document checking with visual testing.
One of the really great things I’ve used at my current employer is visual testing to check pdf documents. We use a 3rd party named Aspose (other products are available) which enables us to extract a specified page or all pages of documents into images.
Within our tests we pass a pdf document to Aspose and covert the whole document or a specified page into an image or images and then run these through the image comparison checks. This allows us to compare documents very quickly.
This can be really handy when dealing with documents in a foreign language for example or with documents which may have subtle hard to notice changes within it.
At my current employer we are creating a new chart framework using D3. When it came to start thinking about writing automated checks for the charts this became quite tricky. Of course you can write a check to assert some data, do an action to perhaps increase/decrease the data, and then check some data points in the chart are what you expect but this is a bit of a long winded process.
Accessibility flow (tabability - is that a word??)
Do you use visual testing some other way?
I’d love to hear from you if you use visual testing and use it for something other than what’s listed above?