C# Testing

Open-source C# projects categorized as Testing | Edit details

Top 23 C# Testing Projects

  • GitHub repo Bogus

    :card_index: A simple and sane fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.

    Project mention: Some useful Libraries for .NET projects | dev.to | 2021-10-02

    Bogus Github Nuget: Install-Package Bogus -Version 33.1.1

  • GitHub repo Moq

    Repo for managing Moq 4.x

    Project mention: Never written tests. Is there a simple CRUD project with EF Core I can learn from? | reddit.com/r/dotnet | 2021-09-27

    Have you tried Moq?

  • Syncfusion

    Rapidly build stunning web apps using Syncfusion Blazor UI components.. Includes DataGrid, Charts, Schedular, Diagram, and much more. Our native, high-performance components have rich UIs and data visualization, backed by professional support. Free 30-day Trial.

  • GitHub repo xUnit

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

    Project mention: Code Smell 91 - Test Asserts without Description | dev.to | 2021-10-08

    XUnit: Assert Description Deprecation

  • GitHub repo 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: Practical complex data for unit testing | dev.to | 2021-09-09

    One neat library for creating and generating test data is AutoFixture.  The creators describe it as follows:

  • GitHub repo 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, .NET Core 2.1 and 3.0, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.

    Project mention: ASP.NET Core Unit Testing with FluentAssertions | dev.to | 2021-08-21

    FluentAssertions is one of the most popular (over 66 million downloads on Nuget) .NET library that contains a large collection of .NET extension methods that allow .NET developers to write unit tests using a fluent syntax which is very easy to read and write and clearly shows the intent of the unit test. The library has extension methods to test almost everything related to .NET such as Strings, Booleans, Dates, Guids, Collections, Exceptions, and even Nullable Types. You can add this library to your unit test projects via Nuget package manager and start using this library in few minutes.

  • GitHub repo NUnit

    NUnit 3 Framework

    Project mention: share one RazorPage application of CleanArchitecture Project | reddit.com/r/csharp | 2021-09-16

    NUnit, FluentAssertions, Moq & Respawn

  • GitHub repo 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

  • Scout APM

    Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.

  • GitHub repo NSubstitute

    A friendly substitute for .NET mocking libraries.

    Project mention: Cell CMS - Criando testes de maneira prática | dev.to | 2021-01-31

    nsubstitute / NSubstitute

  • GitHub repo Shouldly

    Should testing for .NET - the way Asserting *Should* be!

  • GitHub repo 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: Teste de unidade com xUnit | dev.to | 2021-04-21

    Referências: https://dotnet.microsoft.com/download https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test https://xunit.net/docs/getting-started/netcore/cmdline https://github.com/coverlet-coverage/coverlet https://github.com/danielpalme/ReportGenerator

  • GitHub repo FakeItEasy

    The easy mocking library for .NET

  • GitHub repo FlaUI

    UI automation library for .Net

    Project mention: What is the best way to control another program from code without using APIs? | reddit.com/r/learnprogramming | 2021-09-13

    Is it possible to control another program via code? This link says yes and the following is the successor of what they originally recommended: https://github.com/FlaUI/FlaUI.

  • GitHub repo pose

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

    Project mention: Best practices can slow your application down | news.ycombinator.com | 2021-03-08

    It sounds like the team is interested in adding more automated tests, but are blocked by static singletons, which have high performance but also high coupling, resulting in poor testability.

    I'm sure they've heard of test libraries like MS Fakes and [Pose](https://github.com/tonerdo/pose); I wonder if these libraries would let them maintain high performance, and only introduce the required layer of indirection during testing?

  • GitHub repo Machine.Specifications

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

    Project mention: Show HN: A C# library to help you enforce a Given-When-Then structured Unit test | news.ycombinator.com | 2021-08-29

    Looks like a similar concept to https://github.com/machine/machine.specifications which I used many years ago to try and achieve BDD style unit testing.

    One point to note from your introduction was the following statement:

  • GitHub repo Verify

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

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

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

    Project mention: How do I capture multiple asserts? | reddit.com/r/dotnet | 2021-07-09

    Instead of doing multiple assertions, why not check for structural (or full) equality over the entire DTO? Compare-Net-Objects can help you here.

  • GitHub repo mockhttp

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

    Project mention: RestClient.Net 5.0.x Beta Released | reddit.com/r/csharp | 2021-04-24
  • GitHub repo Stryker.NET

    Mutation testing for .NET core and .NET framework!

    Project mention: Coverage Is Not Strongly Correlated with Test Suite Effectiveness | reddit.com/r/ExperiencedDevs | 2021-09-27

    I'm thinking to start using https://stryker-mutator.io for my test suite.

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

    Project mention: How do I mock the response from my authentication server for client integration tests? | reddit.com/r/softwaredevelopment | 2021-09-15

    You could try out WireMock.Net: https://github.com/WireMock-Net/WireMock.Net/wiki/Using-WireMock-in-UnitTests

  • GitHub repo Fixie

    Ergonomic Testing for .NET

  • GitHub repo MSTest

    MSTest V2 framework and adapter

    Project mention: NUnit vs. XUnit vs. MSTest: Comparing Unit Testing Frameworks In C# | dev.to | 2021-05-24

    MSTest is the default test framework that is shipped along with Visual Studio. The initial version of MSTest (V1) was not open-source; however, MSTest V2 is open-source. The project is hosted on GitHub. Like other test frameworks, it can also be used for data driven testing. You can download MSTest V2 from Nuget.org.

  • GitHub repo Atata

    C#/.NET test automation framework for web

    Project mention: Load testing with Atata and Selenoid (Part 1) | dev.to | 2021-04-15

    Atata is a great open source project created by @yevgeniyshunevych

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 2021-10-08.

Index

What are some of the best open-source Testing projects in C#? This list will help you:

Project Stars
1 Bogus 4,893
2 Moq 4,298
3 xUnit 3,042
4 AutoFixture 2,428
5 Fluent Assertions 2,381
6 NUnit 2,090
7 SpecFlow 1,795
8 NSubstitute 1,621
9 Shouldly 1,605
10 ReportGenerator 1,508
11 FakeItEasy 1,192
12 FlaUI 1,063
13 pose 898
14 Machine.Specifications 818
15 Verify 696
16 GenFu 692
17 Compare-Net-Objects 683
18 mockhttp 674
19 Stryker.NET 628
20 WireMock.Net 602
21 Fixie 592
22 MSTest 433
23 Atata 388
Find remote jobs at our new job board 99remotejobs.com. There are 34 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.