snapshot-testing

Capture and verify .NET output baselines using the Verify library.

10|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill snapshot-testing-agibuild
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: snapshot-testing
Source: https://github.com/AGIBuild/Agibuild.Fulora/tree/main/.cursor/skills/snapshot-testing
Command: npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill snapshot-testing-agibuild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Verify.Xunit, Verify.Http, PublicApiGenerator, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps prevent unintended changes in your application's output by capturing and comparing it against a baseline, ensuring code stability and predictable behavior.

Core Features & Use Cases

  • Automated Baseline Capture: Generates .verified. files for objects, strings, streams, and HTTP responses.
  • Non-Deterministic Value Scrubbing: Automatically removes or replaces dynamic data like dates and GUIDs for stable comparisons.
  • API Surface Approval: Verifies the public API of assemblies to detect breaking changes.
  • Use Case: When refactoring a complex data serialization process, use this Skill to snapshot the output. If the refactoring accidentally changes the serialization format, the snapshot test will fail, alerting you to the regression.

Quick Start

Use the snapshot-testing skill to verify the output of the OrderSerializationTests.Serialize_CompletedOrder_MatchesSnapshot test.

Frequently Asked Questions about snapshot-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify .NET API responses and object serialization with snapshot testing?

Snapshot testing in .NET verifies API responses and object serialization by capturing output into `.verified.` baseline files and comparing subsequent runs against them. The Verify library automates this baseline capture for deterministic output validation.

How do I handle non-deterministic values like dates and GUIDs in snapshot tests?

You handle non-deterministic values like dates and GUIDs in snapshot tests by applying custom scrubbers. The Verify library uses these scrubbers to automatically remove or replace dynamic data, ensuring stable comparisons across test runs.

How can I detect breaking changes in my assembly's public API surface?

You can detect breaking changes in your assembly's public API surface by using PublicApiGenerator alongside snapshot testing. This approach verifies the public API of assemblies against a baseline snapshot to catch unintended modifications.

Does the Verify library work with XUnit for .NET testing?

Yes, the Verify library works with XUnit through the Verify.Xunit dependency. This integration facilitates snapshot testing within your existing XUnit test suites to validate HTML rendering, strings, and streams.

What is the best way to prevent regression when refactoring data serialization?

The best way to prevent regression when refactoring data serialization is snapshot testing. By capturing the serialized output as a baseline, any accidental format changes during refactoring will fail the test and alert you to the regression.

Why do my snapshot tests fail when comparing HTTP responses with dynamic values?

Snapshot tests fail comparing HTTP responses with dynamic values because non-deterministic data differs between runs. Using Verify.Http with custom scrubbers to normalize these dynamic values ensures stable HTTP response verification.