# Snapshot Testing

> Catch regressions with snapshot approval tests for APIs

- Skill: `loopyluci/snapshot-testing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add loopyluci/snapshot-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/loopyluci/snapshot-testing/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: LoopyLuci (https://skillmd.com/u/loopyluci)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/loopyluci/snapshot-testing

---


# Snapshot Testing

## syrupy (Python)
```bash
pip install syrupy
```

```python
def test_api_response(snapshot):
    resp = client.get("/api/users")
    assert resp.json() == snapshot
```

## First Run
Creates snapshot file. Subsequent runs compare.

## Update Snapshots
```bash
pytest --snapshot-update
```

## Best For
- API response shapes
- Serialization output
- Error message formatting

