Performance Comparison of Unit Test Isolation Frameworks

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 NSub...

Full description

Bibliographic Details
Main Authors: Mateusz Domański, Michał Dołęga, Grzegorz Kozieł
Format: Article
Language:English
Published: Lublin University of Technology 2022-06-01
Series:Journal of Computer Sciences Institute
Subjects:
Online Access:https://ph.pollub.pl/index.php/jcsi/article/view/2908
_version_ 1811258508755075072
author Mateusz Domański
Michał Dołęga
Grzegorz Kozieł
author_facet Mateusz Domański
Michał Dołęga
Grzegorz Kozieł
author_sort Mateusz Domański
collection DOAJ
description 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.
first_indexed 2024-04-12T18:14:29Z
format Article
id doaj.art-ed15a3602b14480ca062dae0a2d9b0ee
institution Directory Open Access Journal
issn 2544-0764
language English
last_indexed 2024-04-12T18:14:29Z
publishDate 2022-06-01
publisher Lublin University of Technology
record_format Article
series Journal of Computer Sciences Institute
spelling doaj.art-ed15a3602b14480ca062dae0a2d9b0ee2022-12-22T03:21:41ZengLublin University of TechnologyJournal of Computer Sciences Institute2544-07642022-06-012310.35784/jcsi.2908Performance Comparison of Unit Test Isolation FrameworksMateusz Domański0Michał DołęgaGrzegorz Kozieł{'en_US': 'Lublin University of Technology'} 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. https://ph.pollub.pl/index.php/jcsi/article/view/2908code isolation; unit testing; mock objects
spellingShingle Mateusz Domański
Michał Dołęga
Grzegorz Kozieł
Performance Comparison of Unit Test Isolation Frameworks
Journal of Computer Sciences Institute
code isolation; unit testing; mock objects
title Performance Comparison of Unit Test Isolation Frameworks
title_full Performance Comparison of Unit Test Isolation Frameworks
title_fullStr Performance Comparison of Unit Test Isolation Frameworks
title_full_unstemmed Performance Comparison of Unit Test Isolation Frameworks
title_short Performance Comparison of Unit Test Isolation Frameworks
title_sort performance comparison of unit test isolation frameworks
topic code isolation; unit testing; mock objects
url https://ph.pollub.pl/index.php/jcsi/article/view/2908
work_keys_str_mv AT mateuszdomanski performancecomparisonofunittestisolationframeworks
AT michałdołega performancecomparisonofunittestisolationframeworks
AT grzegorzkozieł performancecomparisonofunittestisolationframeworks