Lune

WWW2024Top-tier venue

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%).

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Empirical Analysis of UI-based Flaky Tests cites A study on the lifecycle of flaky tests
  • Detecting flaky tests in probabilistic and machine learning applications cites A study on the lifecycle of flaky tests
  • Who's to Blame? Rethinking the Brittleness of Automated Web GUI Testing from a Pragmatic Perspective cites An Empirical Analysis of UI-based Flaky Tests
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. 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
  2. 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

  1. A study on the lifecycle of flaky testsWing Lam, Kivanç Muslu, Hitesh Sajnani, Suresh ThummalapentaICSE 2020 · 107 citations
  2. Detecting flaky tests in probabilistic and machine learning applicationsSaikat Dutta, August Shi, Rutvik Choudhary, Zhekun Zhang et al.ISSTA 2020 · 71 citations
  3. FlakeFlagger: Predicting Flakiness Without Rerunning TestsAbdulrahman Alshammari, Christopher Morris, Michael Hilton, Jonathan BellICSE 2021 · 63 citations
  4. Dependent-test-aware regression testing techniquesWing Lam, August Shi, Reed Oei, Sai Zhang et al.ISSTA 2020 · 44 citations
  5. An Empirical Analysis of UI-based Flaky TestsAlan Romano, Zihe Song, Sampath Grandhi, Wei Yang et al.ICSE 2021 · 43 citations

Related papers

  1. Automated Fixing of Web UI Tests via Iterative Element MatchingYuanzhang Lin, Guoyao Wen, Xiang GaoASE 2023 · 8 citations
  2. Automatic Web Testing Using Curiosity-Driven Reinforcement LearningYan Zheng, Yi Liu, Xiaofei Xie, Yepang Liu et al.ICSE 2021 · 75 citations
  3. Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 citations
  4. Semantic Test Repair for Web ApplicationsXiaofang Qi, Xiang Qian, Yanhui LiFSE 2023 · 5 citations
  5. Neurosymbolic Repair of Test FlakinessYang Chen, Reyhaneh JabbarvandISSTA 2024 · 8 citations
Dusk over the sea between two cliffs drawn in fine vertical lines