IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration
Open Access
- 30 June 2026
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 1515-1535
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.Keywords
Funding Information
- National Key Research and Development Program of China (2024YFB4506400)
This publication has 38 references indexed in Scilit:
- The qualitative factor in software testing: A systematic mapping study of qualitative methodsJournal of Systems and Software, 2025
- Intent-Driven Mobile GUI Testing with Autonomous Large Language Model Agents2024
- Semantic matching in GUI test reuseEmpirical Software Engineering, 2024
- JTestMigBench and JTestMigTax: A benchmark and taxonomy for unit test migration2023
- Test Reuse based on Adaptive Semantic Matching across Android Mobile Applications2022
- Cross Platform API Mappings based on API Documentation Graphs2022
- Characterizing usages, updates and risks of third-party libraries in Java projectsEmpirical Software Engineering, 2022
- An Empirical Study of Usages, Updates and Risks of Third-Party Libraries in Java Projects2020
- Test Transfer Across Mobile Apps Through Semantic Mapping2019
- Test Migration Between Mobile Apps with Similar Functionality2019