← Browse all tools

Go Back
Report Abuse

ApprovalTests

Approval testing libraries for many languages

Tool overview

ApprovalTests is a family of libraries for approval testing, also called snapshot testing. Instead of writing an assertion for each property of a result, the test verifies the whole result, for example Approvals.verify(person), and compares it with a previously approved version stored in a file.

When the result differs, the test fails and a diff tool opens to show the changes, which the developer can approve to make them the new reference. This makes it easier to test complex objects, long texts, reports or legacy code whose expected output is hard to write by hand.

The libraries are free and open source and exist for many languages, including Java, C#, C++, Python, JavaScript, Go, PHP, Perl, Lua, Dart and LabVIEW.

Screenshots & video

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://approvaltests.com/
https://github.com/approvals