Automating GUI-based Test Oracles for Mobile Apps

Kesina Baral, Jack Johnson, Junayed Mahmud, Sabiha Salma, Mattia Fazzini, Julia Rubin, Jeff Offutt, Kevin Moran

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

In automated testing, test oracles are used to determine whether software behaves correctly on individual tests by comparing expected behavior with actual behavior, revealing incorrect behavior. Automatically creating test oracles is a challenging task, especially in domains where software behavior is difficult to model. Mobile apps are one such domain, primarily due to their event-driven, GUI-based nature, coupled with significant ecosystem fragmentation.This paper takes a step toward automating the construction of GUI-based test oracles for mobile apps, first by characterizing common behaviors associated with failures into a behavioral taxonomy, and second by using this taxonomy to create automated oracles. Our taxonomy identifies and categorizes common GUI element behaviors, expected app responses, and failures from 124 reproducible bug reports, which allow us to better understand oracle characteristics. We use the taxonomy to create app-independent oracles and report on their generalizability by analyzing an additional dataset of 603 bug reports. We also use this taxonomy to define an app-independent process for creating automated test oracles, which leverages computer vision and natural language processing, and apply our process to automate five types of app-independent oracles. We perform a case study to assess the effectiveness of our automated oracles by exposing them to 15 real-world failures. The oracles reveal 11 of the 15 failures and report only one false positive. Additionally, we combine our oracles with a recent automated test input generation tool for Android, revealing two bugs with a low false positive rate. Our results can help developers create stronger automated tests that can reveal more problems in mobile apps and help researchers who can use the understanding from the taxonomy to make further advances in test automation.CCS CONCEPTS• Software and its engineering → Software maintenance tools; Software testing and debugging; Software usability.

Original languageEnglish (US)
Title of host publicationProceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages309-321
Number of pages13
ISBN (Electronic)9798400705878
StatePublished - 2024
Event21st IEEE/ACM International Conference on Mining Software Repositories, MSR 2024 - Lisbon, Portugal
Duration: Apr 15 2024Apr 16 2024

Publication series

NameProceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024

Conference

Conference21st IEEE/ACM International Conference on Mining Software Repositories, MSR 2024
Country/TerritoryPortugal
CityLisbon
Period4/15/244/16/24

Bibliographical note

Publisher Copyright:
© 2024 ACM.

Keywords

  • Mobile apps
  • Software Testing
  • Test Oracles
  • UI Analysis

Fingerprint

Dive into the research topics of 'Automating GUI-based Test Oracles for Mobile Apps'. Together they form a unique fingerprint.

Cite this