snapshot-testing

Compare .NET outputs against human-approved baseline files using the Verify library.

57|7|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/seiggy/lucia-dotnet --skill snapshot-testing-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: snapshot-testing
Source: https://github.com/seiggy/lucia-dotnet/tree/main/.github/skills/snapshot-testing
Command: npx skills add https://github.com/seiggy/lucia-dotnet --skill snapshot-testing-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents unintended changes in your code's output, API surfaces, and serialized data by comparing current results against human-approved baselines.

Core Features & Use Cases

  • Snapshot Testing: Captures output and compares it against a human-approved baseline file.
  • API Surface Approval: Detects breaking changes in public APIs.
  • Output Verification: Validates rendered HTML, HTTP responses, and serialized objects.
  • Use Case: After refactoring a complex data model, use this Skill to ensure its JSON serialization hasn't unexpectedly changed, preventing subtle bugs in downstream systems.

Quick Start

Use the snapshot-testing skill to verify the output of the VerifyUserDto function.

Frequently Asked Questions about snapshot-testing

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

FAQPage Schema
What is snapshot testing and how does it prevent unintended changes in .NET applications?

Snapshot testing prevents unintended changes by comparing current API surfaces and serialized outputs against human-reviewed baseline files, detecting regressions automatically without requiring explicit assertions.

How do I verify API surfaces and HTTP responses using the Verify library in .NET?

You verify API surfaces and HTTP responses by capturing the output with the Verify library, which generates a baseline file for human review and automatically diffs future runs to detect breaking changes.

Can I use snapshot testing to validate serialized JSON outputs after refactoring a data model?

Yes, snapshot testing validates serialized JSON outputs by comparing the refactored data model's serialization against an approved baseline, ensuring downstream systems are not affected by unexpected output changes.

Does snapshot testing require explicit developer approval when output changes are detected?

Yes, snapshot testing requires explicit developer approval when modifications are detected, ensuring that any changes to rendered HTML, HTTP responses, or API surfaces are intentional and reviewed before updating baselines.

What's the best way to detect breaking changes in public APIs during automated testing?

The best way to detect breaking changes in public APIs is using snapshot testing to capture the API surface, compare it against approved baselines, and flag any unintended modifications for explicit developer review.

When should I not use snapshot testing for output verification?

You should avoid snapshot testing for output verification when outputs are highly volatile or non-deterministic, as the automated diffing against baseline files will require constant manual approval and diminish the value of regression detection.