Performance Comparison of Unit Test Isolation Frameworks

Main Article Content

DOI

Mateusz Domański

mateusz.domanski1@pollub.edu.pl

Michał Dołęga

michal.dolega@pollub.edu.pl

Grzegorz Kozieł

g.koziel@pollub.pl

Abstract

The goal of unit testing is to verify that individual parts of application are correct. For external dependencies mock objects should be created. This process is supported by dedicated libraries. The paper compares three unit test isolation frameworks for .NET: Moq 4.16.1, FakeItEasy 7.2.0 and NSubstitute 4.2.2. The performance research included comparison of benchmark execution times and comparison of unit test execution times in which selected methods of tested libraries were used. The results are shown on box plots. The analysis shows that Moq is optimal mocking framework.

Keywords:

code isolation; unit testing; mock objects

References

Article Details

Domański, M., Dołęga, M., & Kozieł, G. (2022). Performance Comparison of Unit Test Isolation Frameworks. Journal of Computer Sciences Institute, 23, 123–127. https://doi.org/10.35784/jcsi.2908