C# Testing

Open-source C# projects categorized as Testing

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.

    Project mention: Bogus custom Dataset | dev.to | 2024-01-06

    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.

  • xUnit

    xUnit.net is a free, open source, community-focused unit testing tool for .NET.

    Project mention: Optimizing C# code analysis for quicker .NET compilation | dev.to | 2023-11-14

    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-07

    Testcontainers

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

    Project mention: API: Go, .NET, Rust | /r/dotnet | 2023-12-09

    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.

  • NSubstitute

    A friendly substitute for .NET mocking libraries.

    Project mention: What am I missing about interfaces? | /r/csharp | 2023-11-23

    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

  • NUnit

    NUnit Framework

    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.

    Project mention: Help With NuGet in Powershell | /r/PowerShell | 2023-06-25

    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.

    Project mention: Do you guys mock everything in your Unit Tests? | /r/csharp | 2023-04-12

    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

    Project mention: I need a place to post programming questions | /r/findareddit | 2023-03-31

    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.

  • FlaUI

    UI automation library for .Net

    Project mention: Automated testing WPF app | /r/csharp | 2023-12-09
  • Shouldly

    Should testing for .NET—the way assertions should be!

  • Stryker.NET

    Mutation testing for .NET core and .NET framework!

    Project mention: Stryker.NET alternatives - Testura.Mutation, visualmutator, fettle, and Faultify | libhunt.com/r/stryker-net | 2023-06-09
  • FakeItEasy

    The easy mocking library for .NET

  • mockhttp

    Testing layer for Microsoft's HttpClient library. Create canned responses using a fluent API.

    Project mention: Mock heavy tests | /r/dotnet | 2023-06-01

    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-04

    ex: 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.

    Project mention: Mock heavy tests | /r/dotnet | 2023-06-01

    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.

  • NetArchTest

    A fluent API for .Net that can enforce architectural rules in unit tests.

    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.

  • pose

    Replace any .NET method (including static and non-virtual) with a delegate

  • 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

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2024-01-06.

C# Testing related posts

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com