Non-Flaky and Nearly Optimal Time-Based Treatment of Asynchronous Wait Web Tests

Citations

WEB OF SCIENCE

2
Citations

SCOPUS

2

초록

Asynchronous waits are a common root cause of flaky tests and a major time-influential factor of Web application testing. We build a dataset of 49 reproducible asynchronous wait flaky tests and their fixes from 26 open source projects to study their characteristics in Web testing. Our study reveals that developers adjusted wait time to address asynchronous wait flakiness in about 63% of cases (31 out of 49), even when the underlying causes lie elsewhere. From this, we introduce TRaf, an automated time-based repair for asynchronous wait flakiness in Web applications. TRaf determines appropriate wait times for asynchronous calls in Web applications by analyzing code similarity and past change history. Its key insight is that efficient wait times can be inferred from the current or past codebase since developers tend to repeat similar mistakes. Our analysis shows that TRaf can statically suggest a shorter wait time to alleviate async wait flakiness immediately upon the detection, reducing test execution time by 11.1% compared to the timeout values initially chosen by developers. With optional dynamic tuning, TRaf can reduce the execution time by 16.8% in its initial refinement compared to developer-written patches and by 6.2% compared to the post-refinements of these original patches. Overall, we sent 16 pull requests from our dataset, each fixing one test, to the developers. So far, three have been accepted by the developers.

키워드

Flaky Test Failure; Automatic Program Repair; Web Front-end Tests
제목
Non-Flaky and Nearly Optimal Time-Based Treatment of Asynchronous Wait Web Tests
저자
Pei, Yu; Sohn, Jeongju; Habchi, Sarra; Papadakis, Mike
DOI
10.1145/3695989
발행일
2025-02
유형
Article
저널명
ACM Transactions on Software Engineering and Methodology
권
34
호
2