The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 23 C# Testing Projects
-
Bogus
:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Bogus NuGet package is fake data generator which can be helpful for populating tables in a database and testing purposes. If a database is not used and Bogus populates list of data each time an application runs, the data is random, never the same. Also, the random data generated by Bogus may not meet a developer’s requirements.
-
Several well-known NuGet packages such as xUnit.net, FluentAssertions, StyleCop, Entity Framework Core, and others include by default a significant number of Roslyn analyzers. They help you adhere to the conventions and best practices of these libraries.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Fluent Assertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
-
testcontainers-dotnet
A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
Project mention: Integration tests with AWS S3 buckets using Localstack and Testcontainers | dev.to | 2023-11-07Testcontainers
-
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.
Yes, it does feel like some of the "standard stuff" in other more nuanced languages are missing (especially miss AutoFixture ngl). Some of those are a conscious decison by the golang team for example.
-
a. you might do so purely out of argo cult, i.e. because someone told you this was the right thing to do™, and that's a silly exercise. b. you could also be doing this for a good reason: to use the interface with a mocking tool like NSubstitute
-
Project mention: CI/CD Pipeline Using GitHub Actions: Automate Software Delivery | dev.to | 2023-07-21
.NET / xUnit / NUnit / MSTest
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
ReportGenerator
ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
I am trying to install ReportGenerator through PowerShell. My understanding from installation page is that I will need NuGet in order to do this.
-
Verify
Verify is a snapshot tool that simplifies the assertion of complex data models and documents.
Bogus - For creating fake data Verify - Snapshot testing for .NET MELT - For testing ILogger usage Stryker - Mutation Testing for .NET TestContainers - run docker programmatically in integration tests
-
SpecFlow
#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
You can also try posting an issue to the SpecFlow GitHub repo. That sometimes gets me an answer. And when all else fails, I just bite the bullet and post to Stack Overflow.
-
-
-
Project mention: Stryker.NET alternatives - Testura.Mutation, visualmutator, fettle, and Faultify | libhunt.com/r/stryker-net | 2023-06-09
-
-
mockhttp
Testing layer for Microsoft's HttpClient library. Create canned responses using a fluent API.
I'd say that without wanting to refactor the code a little bit (maybe moving those HttpClients into a service so that they are easily mocked) your best bet would be to use something like WireMock or MockHttp.
-
System.IO.Abstractions
Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!
-
coyote
Coyote is a library and tool for testing concurrent C# code and deterministically reproducing bugs.
Project mention: Does Your Test Suite Account for Weak Transaction Isolation? | news.ycombinator.com | 2024-01-04ex: https://github.com/microsoft/coyote/blob/main/Samples/Accoun...
-
WireMock.Net
WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
I'd say that without wanting to refactor the code a little bit (maybe moving those HttpClients into a service so that they are easily mocked) your best bet would be to use something like WireMock or MockHttp.
-
Project mention: Can I set a policy (using `editorconfig`?) to require certain namespace aliases? | /r/dotnet | 2023-08-18
Since this happens at the code level (the alias no longer exists at compile time), I probably can't use something like https://github.com/BenMorris/NetArchTest to test for this.
-
-
Compare-Net-Objects
What you have been waiting for :+1: Perform a deep compare of any two .NET objects using reflection. Shows the differences between the two objects.
-
Machine.Specifications
Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
-
vstest
Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
C# Testing related posts
- Bogus custom Dataset
- Does Your Test Suite Account for Weak Transaction Isolation?
- C# User-defined explicit and implicit conversion operators
- Windows form move items up/down in ListView and more
- API: Go, .NET, Rust
- What am I missing about interfaces?
- Optimizing C# code analysis for quicker .NET compilation
-
A note from our sponsor - WorkOS
workos.com | 19 Mar 2024
Index
What are some of the best open-source Testing projects in C#? This list will help you:
Project | Stars | |
---|---|---|
1 | Bogus | 8,133 |
2 | xUnit | 3,976 |
3 | Fluent Assertions | 3,552 |
4 | testcontainers-dotnet | 3,461 |
5 | AutoFixture | 3,199 |
6 | NSubstitute | 2,525 |
7 | NUnit | 2,441 |
8 | ReportGenerator | 2,406 |
9 | Verify | 2,286 |
10 | SpecFlow | 2,195 |
11 | FlaUI | 2,036 |
12 | Shouldly | 1,966 |
13 | Stryker.NET | 1,690 |
14 | FakeItEasy | 1,604 |
15 | mockhttp | 1,523 |
16 | System.IO.Abstractions | 1,457 |
17 | coyote | 1,407 |
18 | WireMock.Net | 1,264 |
19 | NetArchTest | 1,209 |
20 | pose | 1,068 |
21 | Compare-Net-Objects | 1,008 |
22 | Machine.Specifications | 885 |
23 | vstest | 841 |