Learning-based Widget Matching for Migrating GUI Test Cases
Open Access
- 6 February 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-13
Abstract
GUI test case migration is to migrate GUI test cases from a source app to a target app. The key of test case migration is widget matching. Recently, researchers have proposed various approaches by formulating widget matching as a matching task. However, since these matching approaches depend on static word embeddings without using contextual information to represent widgets and manually formulated matching functions, there are main limitations of these matching approaches when handling complex matching relations in apps. To address the limitations, we propose the first learning-based widget matching approach named TEMdroid (TEst Migration) for test case migration. Unlike the existing approaches, TEMdroid uses BERT to capture contextual information and learns a matching model to match widgets. Additionally, to balance the significant imbalance between positive and negative samples in apps, we design a two-stage training strategy where we first train a hard-negative sample miner to mine hard-negative samples, and further train a matching model using positive samples and mined hard-negative samples. Our evaluation on 34 apps shows that TEM-droid is effective in event matching (i.e., widget matching and target event synthesis) and test case migration. For event matching, TEM-droid's Top1 accuracy is 76%, improving over 17% compared to baselines. For test case migration, TEMdroid's F1 score is 89%, also 7% improvement compared to the baseline approach.Keywords
All Related Versions
Funding Information
- National Natural Science Foundation of China (No.62232003, No.62372005, No.62161146003)
- Tencent Foundation/XPLORER PRIZE
This publication has 42 references indexed in Scilit:
- Automated test input generation for android: towards getting there in an industrial case2017
- Siamese network features for image matching2016
- Fully-Convolutional Siamese Networks for Object Tracking2016
- Automated test input generation for Android: are we really there yet in an industrial case?2016
- Sapienz: multi-objective automated testing for Android applications2016
- Training Region-Based Object Detectors with Online Hard Example Mining2016
- EvoDroid: segmented evolutionary testing of Android apps2014
- Dynodroid: an input generation system for Android apps2013
- A Grey-Box Approach for Automated GUI-Model Generation of Mobile Applications2013
- Example-based learning for view-based human face detectionIEEE Transactions on Pattern Analysis and Machine Intelligence, 1998