IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration
Yi Gao, Ziyuan Zhang, Xing Hu, Xiaohu Yang, Xin Xia
Abstract
Unit tests capture both functional checks and domain-specific knowledge, but this knowledge remains locked within individual projects and is rarely reused across libraries with overlapping functionality. Existing migration techniques based on structural code mappings (e.g., API signatures) often break down under divergent designs or cross-language settings, resulting in non-executable migrated tests. In this paper, we present IntentTester, a multi-agent framework for intent-driven test reuse. Instead of translating raw code, IntentTester abstracts tests into a language-agnostic Test Description Language (TDL), aligns them with semantically related entities and dependencies in a repository graph, and synthesizes executable tests through LLM-guided reasoning and iterative validation. This design enables cross-library and cross-language migration without manual intervention, producing migrated tests that existing structure-mapping approaches cannot achieve. We evaluate IntentTester on nine open-source projects across three domains (JSON, HTML, and Time) and two languages (Java and Python). IntentTester generates 2,776 syntactically correct tests with 85% correctness; in comparison, the two baselines achieve 51% and 43%. Among them, 2,410 tests executed successfully, yielding a 74% effectiveness rate. Beyond higher success rates, IntentTester also surfaced previously unknown defects—including stack overflows, null dereferences, and parsing inconsistencies, several of which have been acknowledged or patched by maintainers. Our results show that intent-driven migration shifts the focus from code mappings to semantic alignment, allowing practical cross-library and cross-language test reuse while improving test quality and exposing implementation flaws.
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 e40964b8-dcfb-4946-b8b6-1815f8e09a5eBuilds on10
- AutoCodeRover: Autonomous Program ImprovementYuntong Zhang, Haifeng Ruan, Zhiyu Fan, Abhik RoychoudhuryISSTA 2024 · 96 citations
- Evaluating and Improving ChatGPT for Unit Test GenerationZhiqiang Yuan, Mingwei Liu, Shiji Ding, Kaixin Wang et al.FSE 2024 · 89 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
- Learning-based Widget Matching for Migrating GUI Test CasesYakun Zhang, Wenjie Zhang, Dezhi Ran, Qihao Zhu et al.ICSE 2024 · 20 citations
Related papers
- MUT: Human-in-the-Loop Unit Test MigrationYi Gao, Xing Hu, Tongtong Xu, Xin Xia et al.ICSE 2024 · 3 citations
- Automated Knowledge-Aware Test ReuseZiyuan Zhang, Yi Gao, Xing Hu, Xin Xia et al.FSE 2026
- SpectraDL: A Historical Issue-Driven, Test Specification-Assisted Transfer Testing Approach for Deep Learning Frameworks via LLMsShifan Liu, Chang-ai Sun, Fulei Wu, Wing Kwong ChanISSTA 2026
- Testora: Using Natural Language Intent to Detect Behavioral RegressionsMichael PradelICSE 2026 · 1 citation
- Knowledge Matters: Injecting Project and Testing Knowledge into LLM-based Unit Test GenerationAnji Li, Mingwei Liu, Zhenxi Chen, Zheng Pei et al.ICSE 2026 · 2 citations
