capture-api-response-test-fixture

Capture provider API responses as test fixtures for parsing and regression tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/stellarone/evaluate --skill capture-api-response-test-fixture-stellarone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capture-api-response-test-fixture
Source: https://github.com/stellarone/evaluate/tree/main/.agents/skills/capture-api-response-test-fixture
Command: npx skills add https://github.com/stellarone/evaluate --skill capture-api-response-test-fixture-stellarone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of flaky or inaccurate provider response parsing tests by ensuring you test against the provider’s actual raw outputs.

Core Features & Use Cases

  • Capture true API response bodies as fixtures: Store the real provider response JSON for parsing and regression tests, optionally trimming only when semantics are unchanged.
  • Support both non-streaming and streaming flows: Use generateText response bodies directly, and for streamText enable raw chunk capture and save them via the provided helper.
  • Standardize fixture locations and naming: Keep fixtures in a __fixtures__ folder (following the repository’s existing naming conventions) and use helper patterns shown in existing tests.

Quick Start

Run a provider test script that logs the raw response (for generateText) or saves raw chunks (for streamText), then copy the resulting output into the skill’s __fixtures__ folder with the appropriate filename.

Frequently Asked Questions about capture-api-response-test-fixture

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

FAQPage Schema
How do I capture API response bodies for regression testing?

To capture API response bodies for regression testing, run a provider test script that logs the raw response JSON, then save the output into a `__fixtures__` directory for deterministic parsing assertions.

What is the best way to test streaming API responses without flaky parsing?

Testing streaming API responses reliably requires enabling the includeRawChunks and saveRawChunks workflow to preserve raw streamText chunks, ensuring you test against the provider's actual outputs for stable regression tests.

How do I store test fixtures for generateText and streamText responses?

Store test fixtures for generateText and streamText responses by placing recorded raw response bodies or raw streaming chunks into a standardized `__fixtures__` folder, following the repository's existing naming conventions.

Why do my provider response parsing tests keep failing intermittently?

Provider response parsing tests fail intermittently because they do not test against the provider's actual raw outputs; capturing real API response bodies as test fixtures stabilizes response parsing and eliminates flaky test behavior.

Can I trim captured API response fixtures before saving them?

You can trim captured API response fixtures before saving them, provided you only remove data when the semantics remain unchanged, ensuring the fixture still accurately represents the real provider response for parsing tests.