Transplanting Artefacts between Software Projects

Lead Research Organisation: University College London
Department Name: Computer Science

Abstract

Automated Reuse and Generation of Unit Tests for Software Projects

The problem this project addresses is how to create and maintain, in a time-efficient manner, a collection of effective, high-quality tests when developing software systems. This is important as maintaining a high level of good quality test coverage is required to produce robust software but has a large cost in terms of developer time, and therefore, a large monetary cost. This project is concerned with investigating solutions to this problem by reducing the time and effort to create and maintain tests through both the reuse of existing tests and the generation of new tests.

The challenge of utilising reuse to solve this problem is composed of two main sub-problems: identifying existing tests that make good candidates for reuse and then transplanting these candidates into a new environment.

Research Question: How to identify good candidates for reuse?

To identify reuse candidates, we address the problem of how to search a large corpus of existing tests and determine the most suitable candidates for reuse in a given context.

Research Question: How to transplant the candidates?

To tackle transplantation, we solve the problems of how to extract tests and their dependencies from their environment, implant them in a new environment, and adapt them to properly function in their new environment.

Research Question: Can we learn from tests written in the past to generate new tests?

To investigate solving the problem of automatically maintaining a high level of testing through the generation of new tests, our approach is driven by neural networks that we train to translate from functions to their respective tests. These networks can then be applied to generate tests for new functions.

Research Question: How to link tests to the functions that are tested?

As part of the solution to the project's main objective, we also tackle the problem of the establishment of traceability links between functions and their tests, as our approach to test reuse and generation relies on this and the establishment of traceability links is still an open problem.

Novel Contributions

Given the multifaceted nature of the project, there are multiple novel scientific contributions to be made by the project. The first contribution is a novel approach to modelling the relationships between software artefacts using graphs, which facilitates reasoning about the relationships between artefacts with a single coherent model. Graph edge prediction techniques are used with these models to aid reuse.

The second novel scientific contribution is a new state-of-the-art method to establish traceability links between functions and tests. A contribution which has applications not just in this project but in a host of related software testing contexts where discovering the relationships between functions and tests is required or provides additional benefit.

The third novel scientific contribution is a method for the generation of new tests using neural network models that have not been applied to this context before and utilising the state-of-the-art traceability techniques from the second contribution.

Additional novel scientific contributions may be made by investigations into test transplantation. Previous work on transplantation has been focused on the transplant of functionality and has relied on the aid of a test suite. This project investigates techniques to perform test transplantation that are not bound by the same constraints and are driven by algorithms that incorporate novel methods for performing these techniques.

Publications

10 25 50

Studentship Projects

Project Reference Relationship Related To Start End Student Name
EP/N509577/1 01/10/2016 24/03/2022
1923981 Studentship EP/N509577/1 01/10/2017 24/09/2021 Robert White