Journal of Computer Sciences Institute (Jun 2022)

Performance Comparison of Unit Test Isolation Frameworks

  • Mateusz Domański,
  • Michał Dołęga,
  • Grzegorz Kozieł

DOI
https://doi.org/10.35784/jcsi.2908
Journal volume & issue
Vol. 23

Abstract

Read online

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