Unit and regression tests of scientific software: A study on SWMM

J Comput Sci. 2021 Jul 1:53:10.1016/j.jocs.2021.101347. doi: 10.1016/j.jocs.2021.101347.

Abstract

Testing helps assure software quality by executing a program and uncovering bugs. Scientific software developers often find it challenging to carry out systematic and automated testing due to reasons like inherent model uncertainties and complex floating-point computations. Extending the recent work on analyzing the unit tests written by the developers of the Storm Water Management Model (SWMM) [32], we report in this paper the investigation of both unit and regression tests of SWMM. The results show that the 2953 unit tests of SWMM have a 39.7% statement-level code coverage and a 82.4% user manual coverage. Meanwhile, an examination of 58 regression tests of SWMM shows a 44.9% statement-level code coverage and a near 100% user manual coverage. We also observe a "getter-setter-getter" testing pattern from the SWMM unit tests, and suggest a diversified way of executing regression tests.

Keywords: Regression testing; Scientific software; Storm Water Management Model (SWMM); Test coverage; Unit testing; User manual.