Back to search

UCL (University College London)

Automated recommendation, reuse, and generation of unit tests for software systems

Abstract

dc:description.abstract

This thesis presents a body of work relating to the automated discovery, reuse, and generation of unit tests for software systems with the goal of improving the efficiency of the software engineering process and the quality of the produced software. We start with a novel approach to test-to-code traceability link establishment, called TCTracer, which utilises multilevel information and an ensemble of static and dynamic techniques to achieve state-of-the-art accuracy when establishing links between tests and tested functions and test classes and tested classes. This approach is utilised to provide test-to-code traceability links which facilitate multiple other parts of the work. We then move on to test reuse where we first define an abstract framework, called Rashid, for using connections between artefacts to identify new artefacts for reuse and utilise this framework in Relatest, an approach for producing test recommendations for new functions. Relatest instantiates Rashid by using TCTracer to establish connections between tests and functions and code similarity measures to establish connections between similar functions. This information is used to create lists of recommendations for new functions. We then present an investigation into the automated transplantation of tests which attempts to remove the manual effort required to transform Relatest recommendations and insert them into another project. Finally, we move on to test generation where we utilise neural networks to generate unit test code by learning from existing function-to-test pairs. The first approach, TestNMT, investigates using recurrent neural networks to generate whole JUnit tests and the second approach, ReAssert, utilises a transformer-based architecture to generate JUnit asserts. In total, this thesis addresses the problem by developing approaches for the discovery, reuse, and utilisation of existing functions and tests, including the establishment of relationships between these artefacts, developing mechanisms to aid automated test reuse and learning from existing tests to generate new tests.

Degree

thesis:*
Level dc:type.qualificationlevel
Doctoral
Grantor dc:publisher.institution
UCL (University College London)
Year dc:date.issued
2022

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • White, Robert
Contributors dc:contributor
  • Krinke, Jens

Rights

Language dc:language
en, eng

Identifiers

dc:identifier.*
Repository record dc:identifier.uri
https://discovery.ucl.ac.uk/id/eprint/10143814/

Chain of custody

source
Harvested from
University College London
Base URL
discovery.ucl.ac.uk/cgi/oai2
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
related terms
citation

White, Robert. Automated recommendation, reuse, and generation of unit tests for software systems. Doctoral thesis, UCL (University College London), 2022. https://discovery.ucl.ac.uk/id/eprint/10143814/