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
Copy file name to clipboardExpand all lines: site/docs/commands/test.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,10 +48,25 @@ very_good test [arguments]
48
48
--fail-fast Stop running tests after the first failure.
49
49
--timeout=<seconds> Maximum seconds to let tests run before killing the process.
50
50
Useful when tests hang due to an unbounded pumpAndSettle() call.
51
+
--file-reporter=<name:path> Enable an additional reporter writing test results to a file.
52
+
Should be in the form <name>:<path> (e.g. "json:reports/tests.json").
51
53
52
54
Run "very_good help" to see global options.
53
55
```
54
56
57
+
### Machine-readable test reports
58
+
59
+
If you need a machine-readable summary of your test results (for example to feed a CI tool or convert to JUnit XML), use `--file-reporter`. It maps directly to the `--file-reporter` flag from `flutter test` and `dart test`, and writes the report to a file instead of stdout — so it stays compatible with `very_good test`'s optimization and progress rendering.
60
+
61
+
```sh
62
+
# Emits reports/tests.json alongside the normal test output.
63
+
very_good test --coverage --file-reporter json:reports/tests.json
64
+
```
65
+
66
+
:::info
67
+
`--reporter` and `--machine` are intentionally not exposed: they replace stdout with a machine-readable stream, which prevents `very_good test` from rendering progress and picking up failures. `--file-reporter` gives you the same machine-readable content without that trade-off.
68
+
:::
69
+
55
70
:::tip
56
71
For **Dart** projects, use **`very_good dart test`** instead.
0 commit comments