WEFix: Intelligent Automatic Generation of Explicit Waits for Efficient Web End-to-End Flaky Tests
Xinyue Liu, Zihe Song, Weike Fang, Wei Yang, Weihang Wang
Abstract
Web end-to-end (e2e) testing evaluates the workflow of a web application. It simulates real-world user scenarios to ensure the application flows behave as expected. However, web e2e tests are notorious for being flaky, i.e., the tests can produce inconsistent results despite no changes to the code. One common type of flakiness is caused by nondeterministic execution orders between the test code and the client-side code under test. In particular, UI-based flakiness emerges as a notably prevalent and challenging issue to fix because the test code has limited knowledge about the client-side code execution. In this paper, we propose WEFix, a technique that can automatically generate fix code for UI-based flakiness in web e2e testing. The core of our approach is to leverage browser UI changes to predict the client-side code execution and generate proper wait oracles. We evaluate the effectiveness and efficiency of WEFix against 122 web e2e flaky tests from seven popular real-world projects. Our results show that WEFix dramatically reduces the overhead (from 3.7× to 1.25×) while achieving a high correctness (98%). CCS CONCEPTS • Software and its engineering → Software verification and validation.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fe93b1f3-64c0-457f-a3c4-224d535701f7Cited by top-tier papers2
- WebTestPilot: Agentic End-to-End Web Testing against Natural Language Specification by Inferring Oracles with Symbolized GUI ElementsXiwen Teoh, Yun Lin, Duc-Minh Nguyen, Ruofei Ren et al.FSE 2026 · 1 citation
- Who's to Blame? Rethinking the Brittleness of Automated Web GUI Testing from a Pragmatic PerspectiveHaonan Zhang, Kundi Yao, Zishuo Ding, Lizhi Liao et al.ASE 2025
Builds on6
- A study on the lifecycle of flaky testsWing Lam, Kivanç Muslu, Hitesh Sajnani, Suresh ThummalapentaICSE 2020 · 107 citations
- Detecting flaky tests in probabilistic and machine learning applicationsSaikat Dutta, August Shi, Rutvik Choudhary, Zhekun Zhang et al.ISSTA 2020 · 71 citations
- FlakeFlagger: Predicting Flakiness Without Rerunning TestsAbdulrahman Alshammari, Christopher Morris, Michael Hilton, Jonathan BellICSE 2021 · 63 citations
- Dependent-test-aware regression testing techniquesWing Lam, August Shi, Reed Oei, Sai Zhang et al.ISSTA 2020 · 44 citations
- An Empirical Analysis of UI-based Flaky TestsAlan Romano, Zihe Song, Sampath Grandhi, Wei Yang et al.ICSE 2021 · 43 citations
Related papers
- Automated Fixing of Web UI Tests via Iterative Element MatchingYuanzhang Lin, Guoyao Wen, Xiang GaoASE 2023 · 8 citations
- Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 citations
- Automatic Web Testing Using Curiosity-Driven Reinforcement LearningYan Zheng, Yi Liu, Xiaofei Xie, Yepang Liu et al.ICSE 2021 · 75 citations
- Semantic Test Repair for Web ApplicationsXiaofang Qi, Xiang Qian, Yanhui LiFSE 2023 · 5 citations
- Feature-Driven End-to-End Test GenerationParsa Alian, Noor Nashid, Mobina Shahbandeh, Taha Shabani et al.ICSE 2025 · 2 citations
