OLD | NEW |
---|---|
1 JSON Reporter Protocol | 1 xxJSON Reporter Protocol |
kevmoo
2015/11/24 05:05:11
oops?
| |
2 ====================== | 2 ====================== |
3 | 3 |
4 The test runner supports a JSON reporter which provides a machine-readable | 4 The test runner supports a JSON reporter which provides a machine-readable |
5 representation of the test runner's progress. This reporter is intended for use | 5 representation of the test runner's progress. This reporter is intended for use |
6 by IDEs and other tools to present a custom view of the test runner's operation | 6 by IDEs and other tools to present a custom view of the test runner's operation |
7 without needing to parse output intended for humans. | 7 without needing to parse output intended for humans. |
8 | 8 |
9 Note that the test runner is highly asynchronous, and users of this protocol | |
10 shouldn't make assumptions about the ordering of events beyond what's explicitly | |
11 specified in this document. It's possible for events from multiple tests to be | |
12 intertwined, for a single test to emit an error after it completed successfully, | |
13 and so on. | |
14 | |
9 ## Usage | 15 ## Usage |
10 | 16 |
11 Pass the `--reporter json` command-line flag to the test runner to activate the | 17 Pass the `--reporter json` command-line flag to the test runner to activate the |
12 JSON reporter. | 18 JSON reporter. |
13 | 19 |
14 pub run test --reporter json <path-to-test-file> | 20 pub run test --reporter json <path-to-test-file> |
15 | 21 |
16 The JSON stream will be emitted via standard output. It will be a stream of JSON | 22 The JSON stream will be emitted via standard output. It will be a stream of JSON |
17 objects, separated by newlines. | 23 objects, separated by newlines. |
18 | 24 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 class Metadata { | 243 class Metadata { |
238 // Whether the test case will be skipped by the test runner. | 244 // Whether the test case will be skipped by the test runner. |
239 bool skip; | 245 bool skip; |
240 | 246 |
241 // The reason the test case is skipped, if the user provided it. | 247 // The reason the test case is skipped, if the user provided it. |
242 String? skipReason; | 248 String? skipReason; |
243 } | 249 } |
244 ``` | 250 ``` |
245 | 251 |
246 The metadata attached to a test by a user. | 252 The metadata attached to a test by a user. |
OLD | NEW |