Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Unified Diff: json_reporter.md

Issue 1637193003: Add suite information to the JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: fix changelog Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | json_reporter.schema.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: json_reporter.md
diff --git a/json_reporter.md b/json_reporter.md
index bf8ddf0d02cfaf914115ffa78bfb10ae433b470e..0d374e697adeef613d77067e415c095e2e5e19e5 100644
--- a/json_reporter.md
+++ b/json_reporter.md
@@ -101,6 +101,21 @@ class StartEvent extends Event {
A single start event is emitted before any other events. It indicates that the
test runner has started running.
+### SuiteEvent
+
+```
+class SuiteEvent extends Event {
+ String type = "suite";
+
+ /// Metadata about the suite.
+ Suite suite;
+}
+```
+
+A suite event is emitted before any `GroupEvent`s for groups in a given test
+suite. This is the only event that contains the full metadata about a suite;
+future events will refer to the suite by its opaque ID.
+
### GroupEvent
```
@@ -250,6 +265,9 @@ class Test {
// The name of the test, including prefixes from any containing groups.
String name;
+ // The ID of the suite containing this test.
+ int suiteID;
+
// The IDs of groups containing this test, in order from outermost to
// innermost.
List<int> groupIDs;
@@ -267,6 +285,32 @@ Most tests will have at least one group ID, representing the implicit root
group. However, some may not; these should be treated as having no group
metadata.
+### Suite
+
+```
+class Suite {
+ // An opaque ID for the group.
+ int id;
+
+ // The platform on which the suite is running.
+ String? platform;
+
+ // The path to the suite's file.
+ String path;
+}
+```
+
+A test suite corresponding to a loaded test file. The suite's ID is unique in
+the context of this test run. It's used elsewhere in the protocol to refer to
+this suite without including its full representation.
+
+A suite's platform is one of the platforms that can be passed to the
+`--platform` option, or `null` if there is no platform (for example if the file
+doesn't exist at all). Its path is relative to the root of the current package.
alexander.doroshko 2016/02/11 14:26:43 Spec says that Suite.path is relative to the curre
nweiz 2016/02/12 00:58:25 Good to know. I put out https://codereview.chromiu
+
+Suites don't include their own metadata. Instead, that metadata is present on
+the root-level group.
+
### Group
```
@@ -277,6 +321,9 @@ class Group {
// The name of the group, including prefixes from any containing groups.
String? name;
+ // The ID of the suite containing this group.
+ int suiteID;
+
// The ID of the group's parent group, unless it's the root group.
int? parentID;
@@ -286,7 +333,7 @@ class Group {
```
A group containing test cases. The group's ID is unique in the context of this
-test run. It's used elsewhere in the protocol to refer to this test without
+test run. It's used elsewhere in the protocol to refer to this group without
including its full representation.
The implicit group at the root of each test suite has `null` `name` and
« no previous file with comments | « CHANGELOG.md ('k') | json_reporter.schema.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698