Add contract testing (Schemathesis internal + Pact public)#125
Add contract testing (Schemathesis internal + Pact public)#125jschoedl wants to merge 2 commits into
Conversation
Verify py-recipe-service and py-help-service responses conform to the internal OpenAPI contract, run in-process over ASGI with the LLM stubbed. Both service CI workflows now also trigger on api/openapi-internal.yaml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Consumer-driven Pact over the public REST boundary: the web-client consumer test generates web-client/pacts/, which the spring-api provider test verifies against the real app (JWT auth real, Python GenAI clients mocked). Covers every route the client uses, happy and error paths. The committed pact is the filesystem handoff; spring-api CI triggers on it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2e310a6 to
1fd4805
Compare
|
🚀 Frontend preview ↗ · commit |
Summary
Adds contract testing across both inter-service boundaries, as required by the course best-practices. Each boundary uses the tool that fits its shape:
api/openapi-internal.yaml. Schemathesis derives cases from the spec and checks every response conforms (the LLM is stubbed). It re-syncs itself when the spec changes.web-client/pacts/; the provider test replays it against the real Spring app (real JWT/security, Python GenAI clients mocked). Covers every route the client uses, happy and error paths (401/404/409/400).Type of change
API changes
api/openapi.yamlupdated andapi/scripts/gen-all.shre-runDefinition of Done
🤖 Generated with Claude Code