JTestMigBench and JTestMigTax: A benchmark and taxonomy for unit test migration

Ajay Kumar Jha, Mohayeminul Islam, Sarah Nadi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Unit tests play a critical role in improving software quality. However, writing effective unit tests from scratch is difficult and tedious. One way to reduce this difficulty is to recommend existing tests of semantically similar functions. However, modifying the recommended tests manually might still be difficult and tedious. For example, developers have to understand various code elements in the recommended tests to accurately replace them with semantically similar code elements from the target application. One way to mitigate the issue is by developing a test migration or reuse technique that could automatically transform the code elements in the recommended tests and migrate them to the target application. However, to develop such a technique, we first need to identify what types of code transformations are required to successfully migrate the recommended tests. Therefore, in this paper, we first recruit two external participants to create JTestMigBench, a benchmark of 510 manually migrated JUnit tests for 186 methods from five popular libraries. We then analyze the code changes in the migrated tests to create JTestMigTax, a taxonomy of test code transformation patterns. Our contributions provide the necessary foundations to develop automated unit test migration or reuse techniques.

Original languageEnglish (US)
Title of host publicationProceedings - 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023
EditorsTao Zhang, Xin Xia, Nicole Novielli
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages713-717
Number of pages5
ISBN (Electronic)9781665452786
DOIs
StatePublished - 2023
Event30th IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023 - Macao, China
Duration: Mar 21 2023Mar 24 2023

Publication series

NameProceedings - 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023

Conference

Conference30th IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023
Country/TerritoryChina
CityMacao
Period3/21/233/24/23

Keywords

  • benchmark
  • code transformation
  • reuse
  • taxonomy
  • transplantation
  • unit test migration

ASJC Scopus subject areas

  • Software
  • Safety, Risk, Reliability and Quality

Fingerprint

Dive into the research topics of 'JTestMigBench and JTestMigTax: A benchmark and taxonomy for unit test migration'. Together they form a unique fingerprint.

Cite this