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

Unified Diff: lib/src/runner/reporter/json.dart

Issue 1641353002: Expand the JSON reporter to enable a progress bar. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: 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
Index: lib/src/runner/reporter/json.dart
diff --git a/lib/src/runner/reporter/json.dart b/lib/src/runner/reporter/json.dart
index 8f29bc6897900a4c16d3fa304a497473941364b6..1d1d1357aee77c1a9651fb452d525fde58b5d462 100644
--- a/lib/src/runner/reporter/json.dart
+++ b/lib/src/runner/reporter/json.dart
@@ -66,6 +66,12 @@ class JsonReporter implements Reporter {
/// canceled.
_subscriptions.add(_engine.success.asStream().listen(_onDone));
+ _subscriptions.add(_engine.onSuiteAdded.listen(null, onDone: () {
+ _emit("allSuites", {
+ "count": _engine.addedSuites.length
+ });
+ }));
+
_emit("start", {
"protocolVersion": "0.1.0",
"runnerVersion": testVersion
@@ -194,7 +200,8 @@ class JsonReporter implements Reporter {
"suiteID": suiteID,
"parentID": parentID,
"name": group.name,
- "metadata": _serializeMetadata(group.metadata)
+ "metadata": _serializeMetadata(group.metadata),
+ "testCount": group.testCount
}
});
parentID = id;
« json_reporter.md ('K') | « lib/src/runner/engine.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698