Skip to main content
QUICK REVIEW

[Paper Review] Automation of Android Applications Testing Using Machine Learning Activities Classification

Ariel Rosenfeld, Odaya Kardashov|arXiv (Cornell University)|Sep 4, 2017
Software Testing and Debugging TechniquesComputer Science14 references10 citations
TL;DR

This paper proposes ACAT, a machine learning-based framework that classifies Android app activities into predefined types to enable automated, targeted UI testing. By leveraging activity structure similarity, ACAT applies specialized tests per activity type, outperforming the Android Monkey in detecting logical bugs—discovering all planted bugs and one pre-existing logical flaw, while the Monkey found none.

ABSTRACT

Mobile applications are being used every day by more than half of the world's population to perform a great variety of tasks. With the increasingly widespread usage of these applications, the need arises for efficient techniques to test them. Many frameworks allow automating the process of application testing, however existing frameworks mainly rely on the application developer for providing testing scripts for each developed application, thus preventing reuse of these tests for similar applications. In this paper, we present a novel approach for the automation of testing Android applications by leveraging machine learning techniques and reusing popular test scenarios. We discuss and demonstrate the potential benefits of our approach in an empirical study where we show that our developed testing tool, based on the proposed approach, outperforms standard methods in realistic settings.

Motivation & Objective

  • Address the inefficiency and high maintenance cost of manually written test scripts in Android app testing.
  • Reduce dependency on developer-provided test scripts by enabling automatic test generation based on app structure.
  • Improve detection of functional and logical bugs in Android applications through activity-specific testing.
  • Demonstrate the feasibility of using machine learning to classify app activities and guide automated testing.
  • Enable reuse of test scenarios across similar applications by identifying common activity patterns.

Proposed method

  • Train a machine learning model to classify Android app activities into one of seven predefined types based on UI structure and behavior.
  • Use the Appium framework as a bridge between the test tool and the Android device for UI interaction.
  • Develop an add-on (ACAT) for the TestProject automation platform to integrate the classification and testing pipeline.
  • Apply pre-defined, activity-type-specific test cases to each classified activity to validate expected behaviors.
  • Execute tests using a time- and event-limited approach (2 minutes or 50,000 UI events) to simulate realistic testing conditions.
  • Generate detailed reports on discovered crashes and logical bugs for each activity.

Experimental results

Research questions

  • RQ1Can machine learning techniques be effectively used to classify Android app activities into reusable functional types?
  • RQ2Can activity classification enable more effective and targeted automated testing compared to generic event-based testing?
  • RQ3To what extent can an ML-driven approach detect logical bugs that traditional random event tools like Android Monkey miss?
  • RQ4How does the performance of the ML-based testing approach compare to standard tools in identifying both crashes and logical defects?
  • RQ5Can the framework be extended to support more activity types and reduce reliance on hard-coded test cases?

Key findings

  • ACAT successfully classified all three unseen activities in the experiment with 100% accuracy.
  • ACAT discovered all 10 planted logical bugs in the test applications, while the Android Monkey detected none.
  • ACAT identified a pre-existing logical bug (sending an email with an invalid recipient) in the original application version.
  • The Android Monkey discovered one real-time crash that ACAT missed, indicating a trade-off between crash and logical bug detection.
  • ACAT produced a detailed report of discovered bugs, demonstrating its utility in functional defect detection.
  • The results validate the effectiveness of treating each activity as a self-contained entity with specific expected behaviors, improving test precision.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.