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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Less Cybersickness, Please: Demystifying and Detecting Stereoscopic Visual Inconsistencies in Virtual Reality Apps 引用了 GLIB: towards automated test oracle for graphically-rich applications
- Less Cybersickness, Please: Demystifying and Detecting Stereoscopic Visual Inconsistencies in Virtual Reality Apps 引用了 Seenomaly: vision-based linting of GUI animation effects against design-don't guidelines
- GLIB: towards automated test oracle for graphically-rich applications 引用了 Seenomaly: vision-based linting of GUI animation effects against design-don't guidelines
- GLIB: towards automated test oracle for graphically-rich applications 引用了 Unblind your apps: predicting natural-language labels for mobile GUI components by deep learning
- Seenomaly: vision-based linting of GUI animation effects against design-don't guidelines 引用了 Unblind your apps: predicting natural-language labels for mobile GUI components by deep learning
- Unblind your apps: predicting natural-language labels for mobile GUI components by deep learning 引用了 Seenomaly: vision-based linting of GUI animation effects against design-don't guidelines
- VRExplorer: A Model-based Approach for Semi-Automated Testing of Virtual Reality Scenes 引用了 GLIB: towards automated test oracle for graphically-rich applications
引用它的顶会 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
- Automated Fixing of Web UI Tests via Iterative Element MatchingYuanzhang Lin, Guoyao Wen, Xiang GaoASE 2023 · 8 次引用
- Janus: Detecting Rendering Bugs in Web Browsers via Visual Delta ConsistencyChijin Zhou, Quan Zhang, Bingzhou Qian, Yu JiangICSE 2025 · 2 次引用
- Atropos: Effective Fuzzing of Web Applications for Server-Side VulnerabilitiesEmre Güler, Sergej Schumilo, Moritz Schloegel, Nils Bars 等USENIX Security 2024 · 45 次引用
- Finding All Cross-Site Needles in the DOM Stack: A Comprehensive Methodology for the Automatic XS-Leak Detection in Web BrowsersDominik Trevor Noß, Lukas Knittel, Christian Mainka, Marcus Niemietz 等CCS 2023
- Metamong: Detecting Render-Update Bugs in Web Browsers through FuzzingSuhwan Song, Byoungyoung LeeFSE 2023 · 2 次引用
