Book Image

Testing with F#

By : Mikael Lundin
Book Image

Testing with F#

By: Mikael Lundin

Overview of this book

Table of Contents (17 chapters)
Testing with F#
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Comparing MSTest, NUnit, and xUnit


We have just taken a look at how to get started with the three different testing frameworks: MSTest, NUnit, and xUnit. How should we choose between the three?

None of these frameworks are particularly designed to work with F# or functional programming, but they apply pretty well. MSTest is a bit cumbersome, as it requires a class with the TestClass attribute in order to execute the test suite.

The following highlights the strengths of the frameworks:

  • MSTest: This is a good choice if you're not allowed to run open source in your organization.

  • NUnit: This provides great support for external test data. It is the most mature open source test framework.

  • xUnit: This is the best test framework when it comes to extensibility.

I would choose MSTest for organizations that have extremely high requirements on what kind of software you bring into a project. These could be pharmaceutical companies or those in the financial sector, in situations where compliance is more...