Detection of Android application flaky test based on read-write race

Software testing is a crucial method for ensuring the quality of Android applications. Typically, the failure of test case execution suggests the presence of an error within the application. However, within Android multi-threaded environment, factors such as changes in the execution order of threads can produce inconsistent outcomes for specific operations across multiple test executions, thereby leading to inconsistent test results. In such instances, developers are unable to determine whether errors exist in the program based solely on test results, significantly impacting the reliability of software testing. This phenomenon is referred to as "flaky test." During the development of Android applications, the absence of an appropriate synchronization mechanism to regulate the order of variable access among threads can easily trigger Read- Write races, contributing to flaky tests. In response, this paper introduces a method for detecting flaky tests in concurrency-related Android applications. This method involves capturing the event execution trajectory during test execution and identifying Read-Write races among events along the trajectory. It introduces two key metrics, Event Significance and Inter-Event Influence, to construct an Event Conflict Network. Utilizing this network, the method calculates the priority of the Event Conflict Network and employs priority-based Event Scheduling to identify flaky tests by inducing Read-Write races within as few test executions as possible. The effectiveness of this methodology was assessed using 22 test cases from Android applications. Experimental results demonstrate that our method successfully detected all 22 flaky tests in the dataset, achieving a 33.7% reduction in average detection time compared to existing state-of-the-art methods.

Authors

Institutions

Publication Details

Published
2024-10-16
DOI
https://doi.org/10.1117/12.3034142
Primary Topic
Advanced Malware Detection Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Detection of Android application flaky test based on read-write race

Ruilian Zhao, Dong Hua, Weixi Zhang, Wentian Zhang
Advanced Malware Detection Techniques
article

Detection of Android application flaky test based on read-write race

Ruilian Zhao, Dong Hua, Weixi Zhang, Wentian Zhang
article en

Abstract

Software testing is a crucial method for ensuring the quality of Android applications. Typically, the failure of test case execution suggests the presence of an error within the application. However, within Android multi-threaded environment, factors such as changes in the execution order of threads can produce inconsistent outcomes for specific operations across multiple test executions, thereby leading to inconsistent test results. In such instances, developers are unable to determine whether errors exist in the program based solely on test results, significantly impacting the reliability of software testing. This phenomenon is referred to as "flaky test." During the development of Android applications, the absence of an appropriate synchronization mechanism to regulate the order of variable access among threads can easily trigger Read- Write races, contributing to flaky tests. In response, this paper introduces a method for detecting flaky tests in concurrency-related Android applications. This method involves capturing the event execution trajectory during test execution and identifying Read-Write races among events along the trajectory. It introduces two key metrics, Event Significance and Inter-Event Influence, to construct an Event Conflict Network. Utilizing this network, the method calculates the priority of the Event Conflict Network and employs priority-based Event Scheduling to identify flaky tests by inducing Read-Write races within as few test executions as possible. The effectiveness of this methodology was assessed using 22 test cases from Android applications. Experimental results demonstrate that our method successfully detected all 22 flaky tests in the dataset, achieving a 33.7% reduction in average detection time compared to existing state-of-the-art methods.

Beijing University of Chemical Technology (CN)
Quality Education
Openalex Percentile: Top 80%
Advanced Malware Detection Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.