Testing
Explore curated resources about Testing.
Resources
Articles
Clean code tips - Tests
Testing internal members with InternalsVisibleTo
Using C# Named Arguments to Declutter Complex Tests
Exploring Fluent Assertions
How to get ASP.NET Core logs in the output of xUnit tests
Writing Logs to xunit Test Output
How to name your unit tests. 4 test naming conventions
Introduction to integration testing with xUnit and TestServer in ASP.NET Core
AUTOMATED TESTS: THE WHY
AUTOMATED TESTS: TESTABILITY
The Testing Technique Everyone Should Use in .NET
How to test the logs from ILogger in .NET
The Fastest Way to Run Your Tests in .NET
Videos
Libraries
martincostello/xunit-logging
Logging extensions for xunit
NetArchTest
A fluent API for .Net that can enforce architectural rules in unit tests.
SwissLife-OSS/snapshooter
Snapshooter is a snapshot testing tool for .NET Core and .NET Framework
SwissLife-OSS/squadron
A testing framework for containerized and cloud services
.NET Testcontainers
A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
bombardier
Fast cross-platform HTTP benchmarking tool written in Go
FluentAssertions
Fluent API for asserting the results of unit tests that targets .NET Framework 4.5, 4.7, .NET Standard 1.3, 1.6 and 2.0. Supports the unit test frameworks MSTest, MSTest2, Gallio, NUnit, XUnit, MBunit, MSpec, and NSpec.
Shouldly
Should testing for .NET - the way Asserting -Should- be!
AnthonyGiretti/Calzolari-EFCore-Flurl-FakeBearerToken-TestServer
GregFinzer/Compare-Net-Objects
What you have been waiting for 👍 Perform a deep compare of any two .NET objects using reflection. Shows the differences between the two objects.
force-net/DeepCloner
Fast object cloner for .NET
Tynamix/ObjectFiller.NET
The .NET ObjectFiller fills the properties of your .NET objects with random data
bchavez/Bogus
📇 A simple and sane fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
WireMock-Net/WireMock.Net
WireMock.Net is a flexible library for stubbing and mocking web HTTP responses using request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Mongo2Go/Mongo2Go
Mongo2Go - MongoDB for integration tests (.NET Core 3.0 and .NET 5.0)
JonPSmith/EfCore.TestSupport
Tools for helping in unit testing applications that use Entity Framework Core
AutoFixture/AutoFixture
AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.
nbuilder/nbuilder
Rapid generation of test objects in .NET
LightBDD/LightBDD
BDD framework allowing to create easy to read and maintain tests.
nickdodd79/AutoBogus
A C# library complementing the Bogus generator by adding auto creation and population capabilities.
HofmeisterAn/dotnet-testcontainers
A simple package with guard clause extensions.
testcontainers/testcontainers-dotnet
A .net fork of testcontainers - in early development
GestionSystemesTelecom/fake-authentication-jwtbearer
Simple way to faked an authenticated user for integration test with ASP.Net Core framework
VerifyTests/Verify
Verify is a snapshot tool that simplifies the assertion of complex data models and documents.
adrianiftode/FluentAssertions.Web
FluentAssertions for .Net Web Api projects