Automatically Detecting Visual Bugs in HTML5 Canvas Games
Finlay Macklon, Mohammad Reza Taesiri, Markos Viggiato, Stefan Antoszko, Natalia Romanova, Dale Paas, Cor-Paul Bezemer
摘要
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%, compared to an accuracy of 44.6% with traditional snapshot testing. CCS CONCEPTS • Software and its engineering → Software testing and debugging.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- Less Cybersickness, Please: Demystifying and Detecting Stereoscopic Visual Inconsistencies in Virtual Reality AppsShuqing Li, Cuiyun Gao, Jianping Zhang, Yujia Zhang 等FSE 2024 · 被引用 10 次
- VRExplorer: A Model-based Approach for Semi-Automated Testing of Virtual Reality ScenesZhengyang Zhu, Hong-Ning Dai, Hanyang Guo, Zeqin Liao 等ASE 2025 · 被引用 1 次
- When Fun Turns Toxic: A First Look at Aggressive Advertising in Mini-gamesPei Chen, Geng Hong, Yicheng Qin, Huazhe Wang 等USENIX Security 2026
它引用的顶会 Paper5
- Unblind your apps: predicting natural-language labels for mobile GUI components by deep learningJieshan Chen, Chunyang Chen, Zhenchang Xing, Xiwei Xu 等ICSE 2020 · 被引用 101 次
- Seenomaly: vision-based linting of GUI animation effects against design-don't guidelinesDehai Zhao, Zhenchang Xing, Chunyang Chen, Xiwei Xu 等ICSE 2020 · 被引用 55 次
- MarioNette: Self-Supervised Sprite LearningDmitriy Smirnov, Michaël Gharbi, Matthew Fisher, Vitor Guizilini 等NeurIPS 2021 · 被引用 47 次
- GLIB: towards automated test oracle for graphically-rich applicationsKe Chen, Yufei Li, Yingfeng Chen, Changjie Fan 等FSE 2021 · 被引用 30 次
- Semantic Web Accessibility Testing via Hierarchical Visual AnalysisMohammad Bajammal, Ali MesbahICSE 2021 · 被引用 29 次
相关 Paper
- Janus: Detecting Rendering Bugs in Web Browsers via Visual Delta ConsistencyChijin Zhou, Quan Zhang, Bingzhou Qian, Yu JiangICSE 2025 · 被引用 2 次
- Automated Fixing of Web UI Tests via Iterative Element MatchingYuanzhang Lin, Guoyao Wen, Xiang GaoASE 2023 · 被引用 8 次
- Atropos: Effective Fuzzing of Web Applications for Server-Side VulnerabilitiesEmre Güler, Sergej Schumilo, Moritz Schloegel, Nils Bars 等USENIX Security 2024 · 被引用 45 次
- Metamong: Detecting Render-Update Bugs in Web Browsers through FuzzingSuhwan Song, Byoungyoung LeeFSE 2023 · 被引用 2 次
- More Effective JavaScript Breaking Change Detection via Dynamic Object Relation GraphDezhen Kong, Jiakun Liu, Chao Ni, David Lo 等ISSTA 2025
