Automatically Detecting Visual Bugs in HTML5 <canvas> Games

08/03/2022
by   Finlay Macklon, et al.
0

The HTML5 <canvas> is used to display high quality graphics in web applications such as web games (i.e., <canvas> games). However, automatically testing <canvas> games is not possible with existing web testing techniques and tools, and manual testing is laborious. Many widely used web testing tools rely on the Document Object Model (DOM) to drive web test automation, but the contents of the <canvas> are not represented in the DOM. The main alternative approach, snapshot testing, involves comparing oracle snapshot images with test-time snapshot images using an image similarity metric to catch visual bugs, i.e., bugs in the graphics of the web application. However, creating and maintaining oracle snapshot images for <canvas> games is onerous, defeating the purpose of test automation. In this paper, we present a novel approach to automatically detect visual bugs in <canvas> games. By leveraging an internal representation of objects on the <canvas>, we decompose snapshot images into a set of object images, each of which is compared with a respective oracle asset (e.g., a sprite) using four similarity metrics: percentage overlap, mean squared error, structural similarity, and embedding similarity. We evaluate our approach by injecting 24 visual bugs into a custom <canvas> game, and find that our approach achieves an accuracy of 100 with traditional snapshot testing.

READ FULL TEXT

page 1

page 3

page 5

page 6

page 9

research
01/18/2022

A Taxonomy of HTML5 Canvas Bugs

The HTML5 <canvas> is widely used to display high quality graphics in we...
research
06/19/2021

GLIB: Towards Automated Test Oracle for Graphically-Rich Applications

Graphically-rich applications such as games are ubiquitous with attracti...
research
09/25/2018

Machines that test Software like Humans

Automated software testing involves the execution of test scripts by a m...
research
07/20/2020

Visual Testing of GUIs by Abstraction

Ensuring the correct visual appearance of graphical user interfaces (GUI...
research
03/11/2021

A Survey of Video Game Testing

Video-game projects are notorious for having day-one bugs, no matter how...
research
12/09/2019

A Weak Supervision Approach to Detecting Visual Anomalies for Automated Testing of Graphics Units

We present a deep learning system for testing graphics units by detectin...
research
08/01/2022

Similarity-based web element localization for robust test automation

Non-robust (fragile) test execution is a commonly reported challenge in ...

Please sign up or login with your details

Forgot password? Click here to reset