Awesome
List of Automated Testing (TDD/BDD/ATDD/SBE) Tools and Frameworks for .NET
List of Automated Testing Frameworks for .NET related to methodologies and types of tests:
- Test-Driven Development (TDD)
- Behavior-Driven Development (BDD)
- Specification by Example (SBE)
- Acceptance Test-Driven Development (ATDD)
- Property-Based Testing (PBT)
- Unit / Integration / Acceptance / Specification / etc. Tests
Please feel free to suggest changes and/or new tools/frameworks.
Key:
- Bold — Most Popular / Recommended
Table of Contents
Unit Testing Frameworks
What are unit test frameworks and how are they used? Simply stated, they are software tools to support writing and running unit tests, including a foundation on which to build tests and the functionality to execute the tests and report their results. They are not solely tools for testing; they can also be used as development tools on a par with preprocessors and debuggers. Unit test frameworks can contribute to almost every stage of software development, including software architecture and design, code implementation and debugging, performance optimization, and quality assurance. Paul Hamill, Unit Test Frameworks
Isolation Frameworks
An isolation framework is a set of programmable APIs that makes creating fake objects much simpler, faster, and shorter than hand-coding them. Automate Planet
Mock\replace anything (static, non-virtual, etc.)
Library | Comment |
---|
Harmony 2.0 | Runtime alter functionality by monkey patching methods |
Pose | Pose allows you to replace any .NET method (including static and non-virtual) with a delegate. It is similar to Microsoft Fakes but unlike it Pose is implemented entirely in managed code (Reflection Emit API). Everything occurs at runtime and in-memory, no unmanaged Profiling APIs and no file system pollution with re-written assemblies. |
Smocks | Smocks uses some magic under the hood to mock the normally unmockable. |
Acceptance Testing / Behavior-Driven Development / Specification by Example
Web Application Testing
Testing web application UI e.g. via browser engine.
Web Testing
Testing ASP.NET, HTTP, HttpClient, REST, Web Sockets, AMQP, Blazor etc.
Library | Comment |
---|
Alba | Utilities for ASP.Net Core web services testing |
bUnit | Blazor components testing |
DFrame | This library allows you to write distributed load test scenarios in plain C#, no needs weird gui, dsl, xml, json, yaml. In addition to HTTP/1, you can test HTTP/2, gRPC, MagicOnion, Photon, or original network transport by writing in C#. |
FakeHttpContext | Fake context for HttpContext.Current |
Flurl | URL builder and HTTP client library. |
HttpClient Interception | Simple library to provide stub responses in tests using HttpClient. |
Mock4Net | A fluent API allows to specify the behavior of the server and hence easily stub and mock webservices and REST resources |
MockHttp | Replacement for HttpMessageHandler |
MockNet | Friendly mocking framework to unit test the System.Net.Http namespace |
MockingBird | Discontinued |
My Tested ASP.NET | A fluent unit testing library for ASP.NET Core MVC |
NBomber | Load testing |
PactNet | - Port of Pact<br />- Testing for integrating web apps, APIs and microservices |
Stubbery | API stubs |
WireMock.Net | HTTP response stubbing, matchable on URL/Path, headers, cookies and body content patterns |
Cloud Testing
User Interface Testing
Testing system UI (Win32, WinForms, UWP, etc.), embedded, mobile apps
Library | Comment |
---|
Appium | Supports testing of Universal Windows Platform (UWP) and Classic Windows (Win32) applications |
Coded UI | Discontinued |
FlaUI | Automated UI testing of Windows applications (Win32, WinForms, WPF, Store Apps) |
NUnitForms | Discontinued |
Ranorex | GUI testing for desktop, web and mobile applications |
Scrutiny | F# and C# library for testing state machines by randomly choosing available states and valid transitions. Designed for usage with UI tests. |
Squish GUI Tester | All kinds of cross-platform desktop, mobile, embedded and web applications |
TestComplete | "Ensure the quality of your application without sacrificing speed or agility with an easy-to-use, GUI test automation tool. Our AI-powered object recognition engine and script or scriptless flexibility is unmatched, letting you test every desktop, web, and mobile application with ease." |
TestStack.White | Discontinued |
WinAppDriver | - Windows Application Driver<br>- Service to support Selenium-like UI Test Automation on Windows Applications<br>- Supports testing Universal Windows Platform (UWP), Windows Forms (WinForms), Windows Presentation Foundation (WPF), and Classic Windows (Win32) apps on Windows 10 PCs |
Database Testing
Library | Comment |
---|
DbUnit.NET | Discontinued |
NDbUnit | - Discontinued<br>- Managing database state during unit testing |
Respawn | A small utility to help in resetting test databases to a clean state |
Video Game Testing
Concurrent Testing
Library | Comment |
---|
FluentAssertions.Extensions | |
Microsoft CHESS | - Discontinued<br>- "CHESS is a tool for finding and reproducing Heisenbugs in concurrent programs. CHESS repeatedly runs a concurrent test ensuring that every run takes a different interleaving. If an interleaving results in an error, CHESS can reproduce the interleaving for improved debugging. CHESS is available for both managed and native programs." |
Microsoft Coyote | |
Osherove.ThreadTester | Discontinued |
Typemock Racer | Discontinued |
Memory Testing
Mutation Testing
Mutation testing (or mutation analysis or program mutation) is used to design new software tests and evaluate the quality of existing software tests. Mutation testing involves modifying a program in small ways. Each mutated version is called a mutant and tests detect and reject mutants by causing the behavior of the original version to differ from the mutant. This is called killing the mutant. Test suites are measured by the percentage of mutants that they kill. New tests can be designed to kill additional mutants. Mutants are based on well-defined mutation operators that either mimic typical programming errors (such as using the wrong operator or variable name) or force the creation of valuable tests (such as dividing each expression by zero). The purpose is to help the tester develop effective tests or locate weaknesses in the test data used for the program or in sections of the code that are seldom or never accessed during execution. Mutation testing is a form of white-box testing. Wikipedia
Automated Exploratory Testing
Exploratory testing is an approach to software testing that is often described as simultaneous learning, test design, and execution. It focuses on discovery and relies on the guidance of the individual tester to uncover defects that are not easily covered in the scope of other tests. Atlassian
Property-Based Testing
Property based testing relies on properties. It checks that a function, program or whatever system under test abides by a property. Most of the time, properties do not have to go into too much details about the output. They just have to check for useful characteristics that must be seen in the output. Nicolas Dubien, Introduction to Property Based Testing
Approval Testing
Code Coverage
Continuous Testing
Continuous testing is the process of executing automated tests as part of the software delivery pipeline to obtain immediate feedback on the business risks associated with a software release candidate. Wikipedia
Fluent Assertion Frameworks
Test Data Builders and Dummy Data Generators
Quantum Programming
Helper Libraries
Miscellaneous Tools
Library | Comment |
---|
.NET Testcontainers | Library to support tests with throwaway instances of Docker containers |
AccidentalFish.FSharp.Validation | Simple validator DSL / library for F# |
ArchUnitNET | Library for checking the architecture of C# code |
CheckTestOutput | A library for semi-manual tests. Run a function, manually check the output. But only if it is different than last run |
Compare-Net-Objects | Deep compare of any two .NET objects using reflection |
Gallio Automation Platform | - Common object model, runtime services and tools (such as test runners) that may be leveraged by any number of test frameworks.<br> - Discontinued |
ErrorUnit | Debug C# application by automatically creating C# Unit Tests in Visual Studio that recreate the situation leading up to the error |
ExpressionToCode | Generates valid, readable C# from an Expression Tree |
KREM | Automation and test framework. Integration, regression, spec testing. Well suitable for embedded. Written in Python, but support external scripts, etc. |
NBi | Framework to test Business Intelligence |
NScenario | Library for annotating steps of test case scenarios |
Quality Gate One Studio | Combinatorial and Model-Based Testing, Discontinued |
Scientist.NET | A library for carefully refactoring critical paths |
Squish Test Center | Aggregates test results in a central server and generates statistics |
TestFlask | Recording and mock replay framework with the ability to generate unit tests for recorded scenarios. It also provides some tools to ease scenario testing inside ASP.NET MVC apps |
xRetry | Retry flickering test cases for xUnit and SpecFlow |
Visual Studio Add-Ins
References