Skip to content

Snapshot testing in .NET with Verify that approves outputs through human-reviewed baseline files.

CCM score
65 of 100
skills.sh installs
509
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers API surfaces, HTTP responses, rendered HTML emails, and serialized objects, using Verify.Xunit, Verify.NUnit, or Verify.MSTest
  • Includes a ModuleInitializer setup, scrubbing of GUIDs and timestamps, and recommended .gitignore and .gitattributes rules
  • Enforces a review gate in which .received. output must be approved into .verified. files before tests pass
  • Designed for .NET teams that need to catch unintended changes in complex output, with CI integration for failing on unapproved diffs

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill snapshot-testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Snapshot Testing with Verify

When to Use This Skill

Use snapshot testing when:

  • Verifying rendered output (HTML emails, reports, generated code)
  • Approving public API surfaces for breaking change detection
  • Testing HTTP response bodies and headers
  • Validating serialization output
  • Catching unintended changes in complex objects

What is Snapshot Testing?

Snapshot testing captures output and compares it against a human-approved baseline:

  1. First run: Test generates a .received. file with actual output
  2. Human review: Developer approves it, creating a .verified. file
  3. Subsequent runs: Test compares output against .verified. file
  4. Changes detected: Test fails, diff tool shows differences for review

This catches unintended changes while allowing intentional changes through explicit approval.


Installation

Add Verify Package

dotnet add package Verify.Xunit
# or for other test frameworks:
dotnet add package Verify.NUnit
dotnet add package Verify.MSTest

Configure ModuleInitializer

Create a ModuleInitializer.cs in your test project:

using System.Runtime.CompilerServices;

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
Testing & QA, .NET & C#
First seen
Jun 3, 2026

Questions

What does the snapshot-testing skill do?

The snapshot-testing skill uses Verify for snapshot testing in .NET, so you can approve API surfaces, HTTP responses, rendered emails and serialized outputs. It flags unintended changes by comparing output against human-reviewed baseline files. Changes you approve become the new baseline.

How do I install the snapshot-testing skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill snapshot-testing -y in your project. The command adds the snapshot-testing skill so your agent can use Verify for .NET snapshot tests.

Which test frameworks does snapshot-testing support with Verify?

The snapshot-testing skill sets up Verify.Xunit, and it also covers Verify.NUnit and Verify.MSTest for other .NET test frameworks. A ModuleInitializer file in the test project configures where verified files are stored.

Where does snapshot-testing sit among other Testing & QA skills?

The snapshot-testing skill is in the Testing & QA category, next to tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. It stands apart by focusing on Verify baseline files for .NET output such as rendered email HTML and public API surfaces.

More from aaronontheweb/dotnet-skills

All 34

Similar to Snapshot Testing

More Testing & QA