Verify VS Fluent Assertions

Compare Verify vs Fluent Assertions and see what are their differences.

Verify

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

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. (by fluentassertions)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
Verify Fluent Assertions
5 7
2,324 3,585
2.3% 1.2%
9.7 9.6
7 days ago 6 days ago
C# C#
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Verify

Posts with mentions or reviews of Verify. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-12.
  • Do you guys mock everything in your Unit Tests?
    5 projects | /r/csharp | 12 Apr 2023
    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
  • organizing testing projects
    1 project | /r/csharp | 14 Sep 2022
    Are you familiar with "snapshot testing" tools such as Verify that store expected output in files. It's still unit testing.
  • Add persisted parameters to CLI applications in .NET
    3 projects | dev.to | 26 Aug 2022
    We can use Verify to perform snapshot testing and check for the correct output of the program. In order to make things easier and simplify working with process output capturing and invocation, I used CliWrap.
  • In EF Core every foreach is a potential runtime error that can't be properly fixed
    2 projects | /r/dotnet | 12 Aug 2022
    You will have to write extra code to set up a code base to get it started (there's always a large initial cost in getting things set up, and you'll be writing code that helps get the state of your application setup), but I can assure you that our team paid the initial tax and the only reason our tests change now is because of requirements changes (and maybe sometimes because the testing tools we use like Verify have some breaking changes in behavior when we upgrade). Otherwise, it helps us identify issues in our code, particularly when we do library upgrades or change to a different library. Again, our tests do not change when we completely reimplement anything, just when the external contract changes. We just get to refactor/reimplement and have confidence that the old behavior stays the same. And then you get to hook up a benchmark to your tests and, if your reason for refactoring was performance reasons, you can show that it was effective.
  • Perfect Replayability
    2 projects | /r/ProgrammingLanguages | 29 Jun 2022
    I assume this means you can take something like this, combine it with Snapshot/Approval testing (link to a library I have used), and then you have some quick-to-generate tests that help guard against regressions (even visual ones) by say:

Fluent Assertions

Posts with mentions or reviews of Fluent Assertions. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-20.
  • Integration tests without API dependencies with ASP.NET Core and WireMock.Net
    5 projects | dev.to | 20 Dec 2022
  • [Parte 8] ASP.NET Core: Integration Tests
    4 projects | dev.to | 13 Apr 2022
    FluentAssertions para Asserts muy flexibles y entendibles
  • BREAKING!! NPM package ‘ua-parser-js’ with more than 7M weekly download is compromised
    32 projects | /r/programming | 22 Oct 2021
    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.
  • ASP.NET Core Unit Testing with FluentAssertions
    3 projects | dev.to | 21 Aug 2021
    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.
  • My first NuGet package: Fluent Random Picker
    4 projects | /r/csharp | 27 Jun 2021
    I love fluency. I myself work on a package for fluent programming. I recommend you using FluentAssertions for tests though. Nonetheless, keep working! Starred your repo.
  • Honk#! Honk in convenient C# now!
    5 projects | /r/csharp | 23 Jun 2021
    For example, all tests below this line are written in Honk# + FluentAssertions (the latter is an example of a library which also provides a lot of fluent methods for xUnit to perform assertions). Soon I'll be moving more of its (AngouriMath's) code to this style, as long as it doesn't harm readability and performance.
  • Cell CMS - Criando testes de maneira prática
    6 projects | dev.to | 31 Jan 2021
    fluentassertions / fluentassertions

What are some alternatives?

When comparing Verify and Fluent Assertions you can also consider the following projects:

snapshooter - Snapshooter is a snapshot testing tool for .NET Core and .NET Framework

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

NUnit - NUnit Framework

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

NFluent - Smooth your .NET TDD experience with NFluent! NFluent is an ergonomic assertion library which aims to fluent your .NET TDD experience (based on simple Check.That() assertion statements). NFluent aims your tests to be fluent to write (with a super-duper-happy 'dot' auto-completion experience), fluent to read (i.e. as close as possible to plain English expression), but also fluent to troubleshoot, in a less-error-prone way comparing to the classical .NET test frameworks. NFluent is also directly inspired by the awesome Java FEST Fluent assertion/reflection library (http://fest.easytesting.org/)

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

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

MSTest - MSTest framework and adapter

Moq - Repo for managing Moq 4.x [Moved to: https://github.com/moq/moq]