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

Unified Diff: json_reporter.schema.json

Issue 1461293005: Add a JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 1 month 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: json_reporter.schema.json
diff --git a/json_reporter.schema.json b/json_reporter.schema.json
new file mode 100644
index 0000000000000000000000000000000000000000..b37e5882383d34b318b7cbe9cb47e34b8235ab31
--- /dev/null
+++ b/json_reporter.schema.json
@@ -0,0 +1,106 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "An event emitted by the test package's JSON reporter",
+
+ "definitions": {
+ "Test": {
+ "required": ["id", "name", "metadata"],
+ "properties": {
+ "id": {"type": "integer", "minimum": 0},
+ "name": {"type": "string"},
+ "metadata": {"$ref": "#/definitions/Metadata"}
kevmoo 2015/11/21 03:37:17 I question wether this is required – especially if
nweiz 2015/11/23 22:24:08 We need to report when a test is skipped somehow,
+ }
+ },
+
+ "Metadata": {
+ "required": ["skip", "skipReason"],
+ "properties": {
+ "skip": {"type": "boolean"},
+ "skipReason": {
+ "oneOf": [{"type": "string"}, {"type": "null"}]
+ }
+ }
+ }
+ },
+
+ "required": ["type", "time"],
+ "properties": {
+ "time": {"type": "integer", "minimum": 0},
+ "type": {"type": "string"}
+ },
+
+ "oneOf": [
+ {
+ "title": "StartEvent",
+ "required": ["protocolVersion", "runnerVersion"],
+ "properties": {
+ "type": {"enum": ["start"]},
+ "protocolVersion": {"type": "string"},
+ "runnerVersion": {
+ "oneOf": [{"type": "string"}, {"type": "null"}]
+ }
+ }
+ },
+
+ {
+ "title": "TestStartEvent",
+ "required": ["test"],
+ "properties": {
+ "type": {"enum": ["testStart"]},
+ "test": {"$ref": "#/definitions/Test"}
+ }
+ },
+
+ {
+ "title": "PrintEvent",
+ "required": ["message"],
+ "properties": {
+ "type": {"enum": ["print"]},
+ "message": {"type": "string"}
+ }
+ },
+
+ {
+ "title": "ErrorEvent",
+ "required": ["testID", "error", "stackTrace", "isFailure"],
+ "properties": {
+ "type": {"enum": ["error"]},
+ "testID": {"type": "integer", "minimum": 0},
+ "error": {"type": "string"},
+ "stackTrace": {"type": "string"},
+ "isFailure": {"type": "boolean"}
+ }
+ },
+
+ {
+ "title": "TestDoneEvent",
+ "required": ["testID", "result", "hidden"],
+ "properties": {
+ "type": {"enum": ["testDone"]},
+ "testID": {"type": "integer", "minimum": 0},
+ "result": {"type": "string", "enum": ["success", "failure", "error"]},
+ "hidden": {"type": "boolean"}
+ }
+ },
+
+ {
+ "title": "DoneEvent",
+ "required": ["success"],
+ "properties": {
+ "type": {"enum": ["done"]},
+ "success": {"type": "boolean"}
+ }
+ },
+
+ {
+ "title": "FutureEvent",
+ "properties": {
+ "type": {
+ "not": {
+ "enum": ["start", "testStart", "print", "error", "testDone", "done"]
+ }
+ }
+ }
+ }
+ ]
+}
« no previous file with comments | « json_reporter.md ('k') | lib/src/executable.dart » ('j') | test/runner/json_reporter_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698