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: We need to have a talk about making life easier for newcomers to .NET | news.ycombinator.com | 2021-11-15

    > edit: one more qualm, the Mockito equivalent for C#, NSubstitute, cannot mock a concrete class, only an interface.

    I've never heard of NSubstitute (that doesn't mean it's bad), but most places I've worked at typically use Moq (https://github.com/moq/moq4) which does support interfaces and classes.

  • Smarter Code

    Your Free Guide to Become Microsoft Azure Certified. Get this free guide to learn about different Azure certifications, what fits your current role, preparation resources, and freelancing platforms for Azure professionals to earn income

  • GitHub repo xUnit

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

    Project mention: Clean Architecture Solution Template | dev.to | 2021-11-25

    The projects are all .NET 6 applications with nullable references types and implicit usings enabled. The unit testing projects use Xunit out of the box. There are also support files such as .gitignore, .editorconfig, etc.

  • 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: BREAKING!! NPM package ‘ua-parser-js’ with more than 7M weekly download is compromised | reddit.com/r/programming | 2021-10-22

    https://www.nuget.org/packages/Newtonsoft.Json/ https://www.nuget.org/packages/AutoMapper/ https://www.nuget.org/packages/Dapper/ https://www.nuget.org/packages/FluentValidation/ https://www.nuget.org/packages/FluentAssertions/ https://www.nuget.org/packages/NUnit/ https://www.nuget.org/packages/xunit/ https://www.nuget.org/packages/YamlDotNet/ https://www.nuget.org/packages/Moq/ That is simply not true. Mature c# projects purposely maintain no downstream dependencies and is they do, it's to a major reputable lib. See for yourself - these are staple third party packages commonly used. Anything dependency starting with System or NETStandard is Microsoft maintained.

  • GitHub repo NUnit

    NUnit 3 Framework

    Project mention: What is unit testing? | dev.to | 2021-11-08

    There are unit testing frameworks for most popular programming languages. Some examples of popular unit test frameworks are Jest for Javascript, JUnit for Java, and NUnit for all .Net languages.

  • 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

  • Nanos

    Run Linux Software Faster and Safer than Linux with Unikernels.

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

    Project mention: Adelaide United's Josh Cavallo has openly come out as gay. | reddit.com/r/soccer | 2021-10-27

    Robbie Rogers came out in the MLS like a decade ago

  • 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: Easy way for screen automation in WPF (C#) | reddit.com/r/dotnet | 2021-10-27

    What comes to mind is something like this one: https://github.com/FlaUI/FlaUI I don't think it can do the "search image on screen" part. A smooth mouse movement is only a series of mouse teleports, so that should be coded relatively easy. If you really don't know where the image is on screen and it also does not have a id to search for then it will be a little harder I guess. Like making a screenshot and putting it into some image processing library? Probably there are easier solutions out there

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

    Mutation testing for .NET core and .NET framework!

    Project mention: Any good mutation testing library that is compatible with Jest? | reddit.com/r/learnjavascript | 2021-10-18

    Stryker

  • GitHub repo WireMock.Net

    WireMock.Net is a flexible library 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: 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: Visual Studio Community and Unit Testing | reddit.com/r/csharp | 2021-11-23

    Which exact version of the MSTest packages are you using? Currently it should be MSTest.TestFramework 2.2.7.

  • 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-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 5,014
2 Moq 4,353
3 xUnit 3,092
4 AutoFixture 2,473
5 Fluent Assertions 2,429
6 NUnit 2,119
7 SpecFlow 1,817
8 NSubstitute 1,639
9 Shouldly 1,614
10 ReportGenerator 1,560
11 FakeItEasy 1,205
12 FlaUI 1,115
13 pose 919
14 Machine.Specifications 826
15 Verify 770
16 Compare-Net-Objects 704
17 GenFu 701
18 mockhttp 686
19 Stryker.NET 649
20 WireMock.Net 634
21 Fixie 601
22 MSTest 441
23 Atata 394
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.
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.
scoutapm.com