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: library to generate fake IP addresses | reddit.com/r/dotnet | 2022-08-16

    https://github.com/bchavez/Bogus might work for you.

  • Moq

    Repo for managing Moq 4.x

    Project mention: I need a C# crash course for experienced developers | reddit.com/r/learncsharp | 2022-10-21

    Moq

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • xUnit

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

    Project mention: Is there any way to test a project within another project in c#? | reddit.com/r/csharp | 2022-08-22

    You can execute xunit programmatically, this is an example of how the console runner does it: https://github.com/xunit/xunit/blob/main/src/xunit.v3.runner.console/Program.cs

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

    Project mention: [Parte 8] ASP.NET Core: Integration Tests | dev.to | 2022-04-13

    FluentAssertions para Asserts muy flexibles y entendibles

  • 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: I need a C# crash course for experienced developers | reddit.com/r/learncsharp | 2022-10-21

    AutoFixture

  • NUnit

    NUnit 3 Framework

    Project mention: Reduce your tests cognitive complexity with AutoFixture | dev.to | 2022-05-20

    The setup here is really minimal, just create a new test project. I'll be using xUnit but NUnit should be fine too.

  • 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: Specflow on Docker | reddit.com/r/selenium | 2022-09-13

    Or here... https://github.com/SpecFlowOSS/SpecFlow/blob/master/Dockerfile

  • Zigi

    Delete the most useless function ever: context switching.. Zigi monitors Jira and GitHub updates, pings you when PRs need approval and lets you take fast actions - all directly from Slack! Plus it reduces cycle time by up to 75%.

  • 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: Analyzing and enforcing .NET code coverage with coverlet | dev.to | 2022-11-25
  • NSubstitute

    A friendly substitute for .NET mocking libraries.

    Project mention: Coincidence? I think not | reddit.com/r/ProgrammerHumor | 2022-11-17

    it will change the URL from https://github.com/nsubstitute/NSubstitute to https://github.dev/nsubstitute/NSubstitute (or you can just nav there yourself).

  • Shouldly

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

    Project mention: I need a C# crash course for experienced developers | reddit.com/r/learncsharp | 2022-10-21

    Shouldly - More "fluent" way of writing assertions that I tend to like more personally. Example:

  • Verify

    Verify is a snapshot tool that simplifies the assertion of complex data models and documents.

    Project mention: organizing testing projects | reddit.com/r/csharp | 2022-09-14

    Are you familiar with "snapshot testing" tools such as Verify that store expected output in files. It's still unit testing.

  • FlaUI

    UI automation library for .Net

    Project mention: WPF UI testing | reddit.com/r/dotnet | 2022-10-06

    I would suggest taking a look at FlaUI https://github.com/FlaUI/FlaUI

  • Stryker.NET

    Mutation testing for .NET core and .NET framework!

    Project mention: Killing mutants to improve your tests | dev.to | 2022-11-07

    There are tools that do this automatically, stryker[2] is one of them. When you run stryker, it will create many mutant versions of your production code, and run your tests for each mutant (that's how mutations are called in stryker's' documentation) version of the code. If your tests fail then the mutant is killed. If your tests passed, the mutant survived. Let's have a look at the the result of runnning stryker against reffects-store's code:

  • FakeItEasy

    The easy mocking library for .NET

    Project mention: I need a C# crash course for experienced developers | reddit.com/r/learncsharp | 2022-10-21
  • coyote

    Coyote is a library and tool for testing concurrent C# code and deterministically reproducing bugs.

    Project mention: Using Java's Project Loom to build more reliable distributed systems | news.ycombinator.com | 2022-05-09

    If you're looking for similar concurrency testing in the dotnet world, checkout Coyote:

    https://microsoft.github.io/coyote/

    https://innovation.microsoft.com/en-us/exploring-project-coy...

  • mockhttp

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

    Project mention: Help: how to memory-host & test a unit-test controller/service? | reddit.com/r/dotnet | 2022-04-05

    So if you need to mock http client you may want to look into a library like https://github.com/richardszalay/mockhttp

  • System.IO.Abstractions

    Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!

    Project mention: How to handle cross platform paths WHILE running on the opposite platform? | reddit.com/r/csharp | 2022-02-19

    May be worth checking system.io.abstractions https://github.com/TestableIO/System.IO.Abstractions

  • pose

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

  • 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: Fake apis for testing | reddit.com/r/dotnet | 2022-07-16

    Recently was pointed to WireMock for testing purposes.

  • Machine.Specifications

    Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.

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

  • GenFu

    GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.

  • vstest

    Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.

    Project mention: Pressing CTRL+C while reading user input (Console.ReadLine) has a weird issue. | reddit.com/r/csharp | 2022-06-22

    Another commenter in your first post linked you to a bug report. The original bug was a sporadic one with dotnet test. But commenters added more reliable cases, and cases for other dotnet commands.

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

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 2022-11-25.

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 6,467
2 Moq 4,909
3 xUnit 3,529
4 Fluent Assertions 3,019
5 AutoFixture 2,842
6 NUnit 2,250
7 SpecFlow 2,008
8 ReportGenerator 1,962
9 NSubstitute 1,857
10 Shouldly 1,766
11 Verify 1,710
12 FlaUI 1,469
13 Stryker.NET 1,432
14 FakeItEasy 1,347
15 coyote 1,298
16 mockhttp 1,219
17 System.IO.Abstractions 1,211
18 pose 997
19 WireMock.Net 896
20 Machine.Specifications 849
21 Compare-Net-Objects 834
22 GenFu 782
23 vstest 733
Build time-series-based applications quickly and at scale.
InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.
www.influxdata.com