Skip to content


Subversion checkout URL

You can clone with
Download ZIP
ApprovalTest verification library for .Net
branch: master

Merge pull request #122 from hazzik/patch-1

Use Path.Combine to make a full file name
latest commit c4d839f667
@isidore isidore authored
Failed to load latest commit information.
.nuget Updated Nuget exe
ApprovalTests.MSTest Fixed singlton issue w/jim
ApprovalTests.MSpec Removed BCL requirement w/jim
ApprovalTests.MachineSpecific.Tests BeyondCompare Reporter for 3&4
ApprovalTests.MbUnit cruft...
ApprovalTests.Tests Displays arguments for CombinationalApprovals using invariant culture
ApprovalTests.Xunit Cleanup
ApprovalTests.Xunit2 Fixed singlton issue w/jim
ApprovalTests Use Path.Combine to make a full file name
ApprovalUtilities.Net45 Added ISaverAsync w/jim
ApprovalUtilities.Tests Logger.MarkEntryPoints w/jim
ApprovalUtilities Tested StackTraceScrubber change; minor cleanup
Asp.Net.Demo Move Package
Common Added Reporters, External Images to RDLC, w/jim
Docs/Images Image
MvcApplication.Razor Fixing mvc references
NeedsRepair/ApprovalTests.Silverlight.Tests configured git for binary files
ReportingDemo Added multiple ApprovalName ability w/mark skiba
build MyGet support files/changes
lib/ReportViewer MyGet support files/changes
packages Xunit 2 support
.gitattributes small update + tfs support for lazy loaders w/jim
.gitignore Added NormaliseLineEndingsForTextFilesAttribute to fix line ending is… Inital Transfer from sourceforge
ApprovalTests.ncrunchsolution Inital Transfer from sourceforge Inital Transfer from sourceforge
ApprovalTests.sln Xunit 2 support
ApprovalTests.sln.DotSettings Bugfix and cleanup
ApprovalTests.vsmdi Inital Transfer from sourceforge
ApprovalsKeyPair.snk Changing nuget packing w/simon
CreateNuget.cmd Version 3.0.8
DeployToNuget.cmd Call to batch w/jim Starting Documentation
LocalTestRun.testrunconfig Inital Transfer from sourceforge
MyGet.cmd Changed the build order
VersionInfo.cs Version 3.0.8 Update


Capturing Human Intelligence - ApprovalTests is an open source assertion/verification library to aid unit testing.

It is compatible with most .Net unit testing frameworks (Nunit, MsTest, Xunit, MBUnit)

What can it be used for?

Approval Tests can be used for verifying objects that require more than a simple assert. They also come prepackaged with utilities for some common .Net scenarios including

  • Dictionaries & Collections
  • Long Strings
  • Log Files
  • Asp.Net
  • Asp.Net Mvc
  • Winforms
  • Wpf
  • Entity Framework
  • Rdlc reports

Video Tutorials

You can watch a bunch of short videos on getting started and using ApprovalTests in .Net at YouTube


If you prefer auditory learning, you might enjoy the following podcast

Available on NuGet

Install-Package ApprovalTests

Nightly (CI) Builds available at

ApprovalTests Nightly Build Status

ApprovalTests on the MyGet Gallery Note: Select "Include Prerelease" instead of "Stable Only" (-IncludePrerelease in powershell)


Sample Code

    public class SampleTest
        public void TestList()
            var names = new[] {"Llewellyn", "James", "Dan", "Jason", "Katrina"};
            Approvals.VerifyAll(names, "");

Will Produce a File

[0] = Dan
[1] = James
[2] = Jason
[3] = Katrina
[4] = Llewellyn

Simply rename this to SampleTest.TestList.approved.txt and the test will now pass.

Approved File Artifacts

The *.approved.* files must be checked into source your source control. ApprovalTests now ignores line endings by default (so you can remove *.approved.* binary from your .gitattributes file if you added previously).

If you would like to verify line endings, simply add [assembly: IgnoreLineEndingsAttribute(false)] to your AssemblyInfo.cs

Do not add *.received.* files to your source control (they are transitory, and some SCMs like TFS will lock them or mark them read-only, which will break every dependent test).

More Info


Apache 2.0 License


ask on twitter: @LlewellynFalco or #ApprovalTests

Something went wrong with that request. Please try again.