MUT: Human-in-the-loop unit test migration

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...

Full description

Saved in:
Bibliographic Details
Main Authors: GAO, Yi, HU, Xing, XU, Tongtong, XIA, Xin, LO, David, YANG, Xiaohu
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2024
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/9254
https://ink.library.smu.edu.sg/context/sis_research/article/10254/viewcontent/3597503.3639124.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-10254
record_format dspace
spelling sg-smu-ink.sis_research-102542024-09-02T06:38:21Z MUT: Human-in-the-loop unit test migration GAO, Yi HU, Xing XU, Tongtong XIA, Xin LO, David YANG, Xiaohu 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. 2024-04-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/9254 info:doi/10.1145/3597503.3639124 https://ink.library.smu.edu.sg/context/sis_research/article/10254/viewcontent/3597503.3639124.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Software Engineering
spellingShingle Software Engineering
GAO, Yi
HU, Xing
XU, Tongtong
XIA, Xin
LO, David
YANG, Xiaohu
MUT: Human-in-the-loop unit test migration
description 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.
format text
author GAO, Yi
HU, Xing
XU, Tongtong
XIA, Xin
LO, David
YANG, Xiaohu
author_facet GAO, Yi
HU, Xing
XU, Tongtong
XIA, Xin
LO, David
YANG, Xiaohu
author_sort GAO, Yi
title MUT: Human-in-the-loop unit test migration
title_short MUT: Human-in-the-loop unit test migration
title_full MUT: Human-in-the-loop unit test migration
title_fullStr MUT: Human-in-the-loop unit test migration
title_full_unstemmed MUT: Human-in-the-loop unit test migration
title_sort mut: human-in-the-loop unit test migration
publisher Institutional Knowledge at Singapore Management University
publishDate 2024
url https://ink.library.smu.edu.sg/sis_research/9254
https://ink.library.smu.edu.sg/context/sis_research/article/10254/viewcontent/3597503.3639124.pdf
_version_ 1814047845819351040