Time-based Repair for Asynchronous Wait Flaky Tests in Web Testing

05/15/2023
by   Yu Pei, et al.
0

Asynchronous waits are one of the most prevalent root causes of flaky tests and a major time-influential factor of web application testing. To investigate the characteristics of asynchronous wait flaky tests and their fixes in web testing, we build a dataset of 49 reproducible flaky tests, from 26 open-source projects, caused by asynchronous waits, along with their corresponding developer-written fixes. Our study of these flaky tests reveals that in approximately 63 Wait flaky tests by adapting the wait time, even for cases where the root causes lie elsewhere. Based on this finding, we propose TRaf, an automated time-based repair method for asynchronous wait flaky tests in web applications. TRaf tackles the flakiness issues by suggesting a proper waiting time for each asynchronous call in a web application, using code similarity and past change history. The core insight is that as developers often make similar mistakes more than once, hints for the efficient wait time exist in the current or past codebase. Our analysis shows that TRaf can suggest a shorter wait time to resolve the test flakiness compared to developer-written fixes, reducing the test execution time by 11.1 time, TRaf further reduces the execution time by 20.2

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/31/2021

NodeSRT: A Selective Regression Testing Tool for Node.js Application

Node.js is one of the most popular frameworks for building web applicati...
research
10/28/2018

McFly: Time-Travel Debugging for the Web

Time-traveling debuggers offer the promise of simplifying debugging by l...
research
05/14/2020

Intermittently Failing Tests in the Embedded Systems Domain

Software testing is sometimes plagued with intermittently failing tests ...
research
04/03/2018

Automated Detecting and Repair of Cross-Site Scripting Vulnerabilities

The best practice to prevent Cross Site Scripting (XSS) attacks is to ap...
research
02/23/2021

Toward Speeding up Mutation Analysis by Memoizing Expensive Methods

Mutation analysis has many applications, such as assessing the quality o...
research
09/21/2023

Revealing Performance Issues in Server-side WebAssembly Runtimes via Differential Testing

WebAssembly (Wasm) is a bytecode format originally serving as a compilat...
research
09/01/2018

Test Prioritization in Continuous Integration Environments

Two heuristics namely diversity-based (DBTP) and history-based test prio...

Please sign up or login with your details

Forgot password? Click here to reset