C# Testing

Open-source C# projects categorized as Testing

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: String similarity search and fast LIKE operator using pg_trgm | dev.to | 2021-05-11

    I inserted 10M rows of fake data generated by Bogus into the table. You can download the dump here.

  • GitHub repo Moq

    Repo for managing Moq 4.x

    Project mention: Why does everything have to use interface? | reddit.com/r/dotnet | 2021-04-27

    https://github.com/moq/moq4#features-at-a-glance

  • GitHub repo xUnit

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

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

    xUnit.Net is an open-source testing framework based on the .NET framework. ‘x’ stands for the programming language, e.g., JUnit, NUnit, etc. The creators of NUnit created xUnit as they wanted to build a better framework rather than adding incremental features to the NUnit framework.

  • 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: 14 .NET packages I always recommend | reddit.com/r/dotnet | 2021-03-22

    First time I heard of Bogus, looks interesting, been using AutoFixture for those will definitely take a look at it.

  • GitHub repo Fluent Assertions

    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.

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

    fluentassertions / fluentassertions

  • GitHub repo NUnit

    NUnit 3 Framework

    Project mention: Automated Test in C#? | reddit.com/r/csharp | 2021-04-23

    Sure, there are the Microsofts own MSTest, then NUnit and XUnit and others. For Mocking you can use Moq and surely others I'm not familiar with.

  • 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

  • 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: I've written a little launcher-alike tool that helps you with searching through your currently open browser tabs without having to manually click through all your browser instances. | reddit.com/r/csharp | 2021-03-08

    If you're like me and have way too many tabs open and then get lost whenever you need to access that one tab quickly again, then this software might help you. It basically uses FlaUI to search for tabs in your browser instances and allows you to open the tab within a click. No need to manually click through all your browser instances. Kinda like the launchers everyone knows, just for browser tabs.

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

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

  • GitHub repo Fixie

    Ergonomic Testing for .NET

  • GitHub repo Stryker.NET

    Mutation testing for .NET core and .NET framework!

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

    ✖ An xUnit.net extension for describing each step in a test with natural language.

  • 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

  • GitHub repo BDDfy

    BDDfy is the simplest BDD framework EVER!

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-05-24.

Index

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

Project Stars
1 Bogus 4,546
2 Moq 4,105
3 xUnit 2,910
4 AutoFixture 2,303
5 Fluent Assertions 2,200
6 NUnit 2,037
7 SpecFlow 1,725
8 NSubstitute 1,562
9 Shouldly 1,559
10 ReportGenerator 1,353
11 FakeItEasy 1,139
12 FlaUI 962
13 pose 872
14 Machine.Specifications 811
15 GenFu 660
16 mockhttp 644
17 Compare-Net-Objects 625
18 Fixie 571
19 Stryker.NET 569
20 MSTest 409
21 xBehave.net 378
22 Atata 373
23 BDDfy 364