You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document the console_output parameter and OPENAPI_CONSOLE_OUTPUT
environment variable. Add output examples for all three modes
(default, all, uncovered_only) and a GitHub Actions CI example.
Refs #27
Copy file name to clipboardExpand all lines: README.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ Add the coverage extension to your `phpunit.xml`:
62
62
|`strip_prefixes`| No |`[]`| Comma-separated prefixes to strip from request paths (e.g., `/api`) |
63
63
|`specs`| No |`front`| Comma-separated spec names for coverage tracking |
64
64
|`output_file`| No | — | File path to write Markdown coverage report (relative paths resolve from `getcwd()`) |
65
+
|`console_output`| No |`default`| Console output mode: `default`, `all`, or `uncovered_only` (overridden by `OPENAPI_CONSOLE_OUTPUT` env var) |
65
66
66
67
*Not required if you call `OpenApiSpecLoader::configure()` manually.
67
68
@@ -163,7 +164,11 @@ For Laravel, set the `max_errors` key in `config/openapi-contract-testing.php`.
163
164
164
165
## Coverage Report
165
166
166
-
After running tests, the PHPUnit extension prints a coverage report:
167
+
After running tests, the PHPUnit extension prints a coverage report. The output format is controlled by the `console_output` parameter (or `OPENAPI_CONSOLE_OUTPUT` environment variable).
168
+
169
+
### `default` mode (default)
170
+
171
+
Shows covered endpoints individually and uncovered as a count:
167
172
168
173
```
169
174
OpenAPI Contract Test Coverage
@@ -179,6 +184,56 @@ Covered:
179
184
Uncovered: 41 endpoints
180
185
```
181
186
187
+
### `all` mode
188
+
189
+
Shows both covered and uncovered endpoints individually:
0 commit comments