Lune

ICSE2024Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Semantic matching of GUI events for test reuse: are we there yet? cites FrUITeR: a framework for evaluating UI test reuse
  • Automated Test Transfer across Android Apps using Large Language Models cites FrUITeR: a framework for evaluating UI test reuse
  • IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration cites Semantic matching of GUI events for test reuse: are we there yet?
  • IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration cites Automated Test Transfer across Android Apps using Large Language Models
  • IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration cites FrUITeR: a framework for evaluating UI test reuse
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Automated Test Transfer across Android Apps using Large Language ModelsBenyamin Beyzaei, Saghar Talebipour, Ghazal Rafiei, Nenad Medvidovic et al.ISSTA 2025 · 2 citations
  2. IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test MigrationYi Gao, Ziyuan Zhang, Xing Hu, Xiaohu Yang et al.FSE 2026

Builds on6

  1. Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
  2. CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu et al.S&P 2018 · 426 citations
  3. 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
  4. Semantic matching of GUI events for test reuse: are we there yet?Leonardo Mariani, Ali Mohebbi, Mauro Pezzè, Valerio TerragniISSTA 2021 · 34 citations
  5. FrUITeR: a framework for evaluating UI test reuseYixue Zhao, Justin Chen, Adriana Sejfia, Marcelo Schmitt Laser et al.FSE 2020 · 33 citations

Related papers

  1. Synthesis-Based Enhancement for GUI Test Case MigrationYakun Zhang, Qihao Zhu, Jiwei Yan, Chen Liu et al.ISSTA 2024 · 3 citations
  2. Intention-Based GUI Test Migration for Mobile Apps using Large Language ModelsShaoheng Cao, Minxue Pan, Yuanhong Lan, Xuandong LiISSTA 2025
  3. 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
  4. UI Test Migration Across Mobile PlatformsSaghar Talebipour, Yixue Zhao, Luka Dojcilovic, Chenggang Li et al.ASE 2021 · 30 citations
  5. To Share, or Not to Share: Exploring Test-Case Reusability in Fork EcosystemsMukelabai Mukelabai, Christoph Derks, Jacob Krüger, Thorsten BergerASE 2023 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines