feat: OpenAPI coverage, test generation, and spec diff/impact analysis - #54
Merged
Conversation
Add three linked capabilities on top of the existing contract testing, each with a pure shared engine, a CLI command, and a UI surface. Coverage (src/shared/coverage.ts, cli/coverage.ts) - Map an OpenAPI 3.x spec's operations to workspace requests: operations tested, declared response codes covered, negative tests, never-tested ops. - Run-aware: `--runs <report.json>` (CLI) and in-app request history credit response codes and response-schema properties actually seen. - `api-spector coverage --fail-under <pct>` gates CI; Coverage panel in the app. Test generation (src/shared/openapi-testgen.ts, cli/generate-tests.ts) - Generate happy-path (with response-schema assertion), negative, and boundary tests from a spec; schema-aware value sampling; $ref resolution. - `api-spector generate-tests [--untested-only]`; "Generate tests for N gaps" in the Coverage panel adds them as a collection. API diff & impact (src/shared/openapi-diff.ts, cli/compare.ts) - Classify changes between two specs as breaking/non-breaking (removed op, new required field, type change, dropped response field, required param). - `api-spector compare old new --workspace` maps breaking changes to the tests they affect and gives a deploy verdict; `--fail-on-breaking` gates CI. - Compare panel in the app. Also: coverage:loadSpec IPC + preload bridge, addCollectionObject store action, settings.coverageSpec, and reference docs (coverage, test-generation, api-diff). Adds coverage/openapi-testgen/openapi-diff test suites.
The bare `coverage` rule (for vitest test-coverage output) also matched the src/renderer/src/components/Coverage/ folder on case-insensitive filesystems, so `git add` silently skipped CoverageModal.tsx and it was missing from the build (App.tsx imports it, CI could not resolve it). Anchor the rule to /coverage and add the file.
roydekleijn
force-pushed
the
ui-changes
branch
from
September 5, 2026 15:23
c534324 to
197e556
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add three linked capabilities on top of the existing contract testing, each with a pure shared engine, a CLI command, and a UI surface.
Coverage (src/shared/coverage.ts, cli/coverage.ts)
--runs <report.json>(CLI) and in-app request history credit response codes and response-schema properties actually seen.api-spector coverage --fail-under <pct>gates CI; Coverage panel in the app.Test generation (src/shared/openapi-testgen.ts, cli/generate-tests.ts)
api-spector generate-tests [--untested-only]; "Generate tests for N gaps" in the Coverage panel adds them as a collection.API diff & impact (src/shared/openapi-diff.ts, cli/compare.ts)
api-spector compare old new --workspacemaps breaking changes to the tests they affect and gives a deploy verdict;--fail-on-breakinggates CI.Also: coverage:loadSpec IPC + preload bridge, addCollectionObject store action, settings.coverageSpec, and reference docs (coverage, test-generation, api-diff). Adds coverage/openapi-testgen/openapi-diff test suites.