MUT: Human-in-the-Loop Unit Test Migration
Yi Gao, Xing Hu, Tongtong Xu, Xin Xia, David Lo, Xiaohu Yang
Abstract
Test migration, which enables the reuse of test cases crafted with knowledge and creativity by testers across various platforms and programming languages, has exhibited effectiveness in mobile app testing. However, unit test migration at the source code level has not garnered adequate attention and exploration. In this paper, we propose a novel cross-language and cross-platform test migration methodology, named MUT, which consists of four modules: code mapping, test case filtering, test case translation, and test case adaptation. MUT initially calculates code mappings to establish associations between source and target projects, and identifies suitable unit tests for migration from the source project. Then, MUT's code translation component generates a syntax tree by parsing the code to be migrated and progressively converts each node in the tree, ultima tely generating the target tests, which are compiled and executed in the target project. Moreover, we develop a web tool to assist developers in test migration. The effectiveness of our approach has been validated on five prevalent functional domain projects within the open-source community. We migrate a total of 550 unit tests and submitted pull requests to augment test code in the target projects on GitHub. By the time of this paper submission, 253 of these tests have already been merged into the projects (including 197 unit tests in the Luliyucoordinate-LeetCode project and 56 unit tests in the Rangerlee-HtmlParser project). Through running these tests, we identify 5 bugs, and 2 functional defects, and submitted corresponding issues to the project. The evaluation substantiates that MUT's test migration is both viable and beneficial across programming languages and different projects.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f688b111-0c09-4d91-a083-03500296205bCited by top-tier papers2
- Automated Test Transfer across Android Apps using Large Language ModelsBenyamin Beyzaei, Saghar Talebipour, Ghazal Rafiei, Nenad Medvidovic et al.ISSTA 2025 · 2 citations
- IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test MigrationYi Gao, Ziyuan Zhang, Xing Hu, Xiaohu Yang et al.FSE 2026
Builds on6
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
- CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu et al.S&P 2018 · 426 citations
- Automated Assertion Generation via Information Retrieval and Its Integration with Deep learningHao Yu, Yiling Lou, Ke Sun, Dezhi Ran et al.ICSE 2022 · 42 citations
- Semantic matching of GUI events for test reuse: are we there yet?Leonardo Mariani, Ali Mohebbi, Mauro Pezzè, Valerio TerragniISSTA 2021 · 34 citations
- FrUITeR: a framework for evaluating UI test reuseYixue Zhao, Justin Chen, Adriana Sejfia, Marcelo Schmitt Laser et al.FSE 2020 · 33 citations
Related papers
- Synthesis-Based Enhancement for GUI Test Case MigrationYakun Zhang, Qihao Zhu, Jiwei Yan, Chen Liu et al.ISSTA 2024 · 3 citations
- Intention-Based GUI Test Migration for Mobile Apps using Large Language ModelsShaoheng Cao, Minxue Pan, Yuanhong Lan, Xuandong LiISSTA 2025
- UI Test Migration Across Mobile PlatformsSaghar Talebipour, Yixue Zhao, Luka Dojcilovic, Chenggang Li et al.ASE 2021 · 30 citations
- To Share, or Not to Share: Exploring Test-Case Reusability in Fork EcosystemsMukelabai Mukelabai, Christoph Derks, Jacob Krüger, Thorsten BergerASE 2023 · 4 citations
- Syntax Is All You Need: A Universal-Language Approach to Mutant GenerationSourav Deb, Kush Jain, Rijnard van Tonder, Claire Le Goues et al.FSE 2024 · 7 citations
