Automated Mobile App Test Script Intent Generation via Image and Code Understanding

07/12/2021
by   Shengcheng Yu, et al.
0

Testing is the most direct and effective technique to ensure software quality. However, it is a burden for developers to understand the poorly-commented tests, which are common in industry environment projects. Mobile applications (app) are GUI-intensive and event-driven, so test scripts focusing on GUI interactions play a more important role in mobile app testing besides the test cases for the source code. Therefore, more attention should be paid to the user interactions and the corresponding user event responses. However, test scripts are loosely linked to apps under test (AUT) based on widget selectors, making it hard to map the operations to the functionality code of AUT. In such a situation, code understanding algorithms may lose efficacy if directly applied to mobile app test scripts. We present a novel approach, TestIntent, to infer the intent of mobile app test scripts. TestIntent combines the GUI image understanding and code understanding technologies. The test script is transferred into an operation sequence model. For each operation, TestIntent extracts the operated widget selector and link the selector to the UI layout structure, which stores the detailed information of the widgets, including coordinates, type, etc. With code understanding technologies, TestIntent can locate response methods in the source code. Afterwards, NLP algorithms are adopted to understand the code and generate descriptions. Also, TestIntent can locate widgets on the app GUI images. Then, TestIntent can understand the widget intent with an encoder-decoder model. With the combination of the results from GUI and code understanding, TestIntent generates the test intents in natural language format. We also conduct an empirical experiment, and the results prove the outstanding performance of TestIntent. A user study also declares that TestIntent can save developers' time to understand test scripts.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/12/2020

Layout and Image Recognition Driving Cross-Platform Automated Mobile Testing

The fragmentation problem has extended from Android to different platfor...
research
09/06/2022

Avgust: Automating Usage-Based Test Generation from Videos of App Executions

Writing and maintaining UI tests for mobile apps is a time-consuming and...
research
07/18/2019

Fragility of Layout-Based and Visual GUI Test Scripts: An Assessment Study on a Hybrid Mobile Application

Context: Albeit different approaches exist for automated GUI testing of ...
research
02/19/2021

Prioritize Crowdsourced Test Reports via Deep Screenshot Understanding

Crowdsourced testing is increasingly dominant in mobile application (app...
research
07/18/2019

Espresso vs. EyeAutomate: Comparison of Two Generations of Android GUI Testing

Context: Albeit different approaches exist for automated GUI testing of ...
research
11/29/2020

How to Measure Your App: A Couple of Pitfalls and Remedies in Measuring App Performance in Online Controlled Experiments

Effectively measuring, understanding, and improving mobile app performan...
research
08/29/2018

Auto-generated Spies Increase Test Maintainability

We have inspected the test code for the scala.collection.Iterator trait ...

Please sign up or login with your details

Forgot password? Click here to reset