Enhancing unit testing to improve maintainability of the software

Sinisalo, Susanna · Tampere University of Technology Institutional Repository · 2017

Many companies are using software that have been developed many years ago. These legacy programs are important to their users and often their development is still ongoing. New features are developed and old ones adapted to suit the current needs of the users. Legacy programs often have quality problems, which makes it increasingly difficult to maintain them. But because of their size, numerous features, and business rules that are documented only in the code, it is difficult to replace them. Therefore, it is imperative to improve their quality safely without introducing defects to the current features. Quality can be enhanced by unit testing and refactoring, but in legacy projects writing unit tests and refactoring is usually error prone and difficult due to the characteristics of legacy software. Taking quality into account when developing new and legacy software is important to ensure the software can be developed further and used in the future. High quality code is maintainable even when it has been developed a long time. First in this thesis, legacy software problems in quality, refactoring and unit testing were researched. Then, solutions to avoid the problems and increase the quality of software and especially legacy software mainly by safe refactoring and unit testing were searched from literature and research publications. Quality control and metrics were also included in the thesis to supplement the quality enhancement process. In this thesis, it was found that safe refactoring, unit test quality, code and test quality control, and developer training need to be considered to improve software quality. Refactoring should be done in small steps while writing tests to ensure the current functionality does not change. Unit test quality, especially, test isolation, readability, and test focus need to be considered while writing tests. The quality of the tests need to be monitored to maintain a proper quality level. It is also important to support the developers for them to improve and maintain their unit testing and refactoring skills.

Read the paper · More papers on PaperTik