Test Code Flakiness in Mobile Apps: The Developer’s Perspective

Valeria Pontillo, Fabio Palomba, Filomena Ferrucci

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)

Abstract

Context:

Test flakiness arises when test cases have a non-deterministic, intermittent behavior that leads them to either pass or fail when run against the same code. While researchers have been contributing to the detection, classification, and removal of flaky tests with several empirical studies and automated techniques, little is known about how the problem of test flakiness arises in mobile applications.
Objective:

We point out a lack of knowledge on: (1) The prominence and harmfulness of the problem; (2) The most frequent root causes inducing flakiness; and (3) The strategies applied by practitioners to deal with it in practice. An improved understanding of these matters may lead the software engineering research community to assess the need for tailoring existing instruments to the mobile context or for brand-new approaches that focus on the peculiarities identified.
Methods:

We address this gap of knowledge by means of an empirical study into the mobile developer’s perception of test flakiness. We first perform a systematic grey literature review to elicit how developers discuss and deal with the problem of test flakiness in the wild. Then, we complement the systematic review through a survey study that involves 130 mobile developers and that aims at analyzing their experience on the matter.
Results:

The results of the grey literature review indicate that developers are often concerned with flakiness connected to user interface elements. In addition, our survey study reveals that flaky tests are perceived as critical by mobile developers, who pointed out major production code- and source code design-related root causes of flakiness, other than the long-term effects of recurrent flaky tests. Furthermore, our study lets the diagnosing and fixing processes currently adopted by developers and their limitations emerge.
Conclusion:

We conclude by distilling lessons learned, implications, and future research directions.
Original languageEnglish
Article number107394
Number of pages27
JournalInformation and Software Technology
Volume168
DOIs
Publication statusPublished - Apr 2024

Bibliographical note

Funding Information:
Fabio is partially funded by the Swiss National Science Foundation, Switzerland through the SNF Projects No. PZ00P2_186090. This work has been partially supported by the EMELIOT national research project, which has been funded by the MUR, Italy under the PRIN 2020 program (Contract 2020W3A5FY ).

Publisher Copyright:
© 2023 The Author(s)

Keywords

  • Test Code Flakiness
  • Software Testing
  • Mobile Apps Development
  • mixed-method research

Fingerprint

Dive into the research topics of 'Test Code Flakiness in Mobile Apps: The Developer’s Perspective'. Together they form a unique fingerprint.

Cite this