From 4d07f8cde5031dd64baabca9b758db8cd921d871 Mon Sep 17 00:00:00 2001 From: UMADEVI KAPU Date: Thu, 29 Jun 2017 19:57:07 +0530 Subject: [PATCH 1/4] Issue #145, Minor issues fixed --- eiffel-vocabulary/EiffelTestCaseFinishedEvent.md | 6 +++--- .../EiffelTestExecutionRecipeCollectionCreatedEvent.md | 2 +- .../simple.json | 0 examples/events/EiffelTestCaseFinishedEvent/simple.json | 2 +- schemas/EiffelActivityTriggeredEvent/1.0.0.json | 9 ++++++++- .../{1.0.0.json => 1.0.1.json} | 2 +- schemas/EiffelTestCaseTriggeredEvent/1.0.0.json | 9 ++++++++- .../1.0.0.json | 3 +-- 8 files changed, 23 insertions(+), 10 deletions(-) rename examples/events/{EiffelTestCaseCanceled => EiffelTestCaseCanceledEvent}/simple.json (100%) rename schemas/EiffelTestCaseFinishedEvent/{1.0.0.json => 1.0.1.json} (99%) diff --git a/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md b/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md index fb4fce7a..8116339a 100644 --- a/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md +++ b/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md @@ -60,12 +60,12 @@ __Description:__ A list of metrics collected during the test case execution. Not ##### data.outcome.metrics.name __Type:__ String -__Required:__ No +__Required:__ Yes __Description:__ The metrics name. ##### data.outcome.metrics.value __Type:__ Any -__Required:__ No +__Required:__ Yes __Description:__ The metrics value. ### data.persistentLogs @@ -86,7 +86,7 @@ __Description:__ The URI at which the log can be retrieved. ## Version History | Version | Introduced in | Changes | | --------- | ------------------------------------------------------ | --------------------------------------- | -| 1.0.0 | [edition-bordeaux](../../../tree/edition-bordeaux) | Initial version. | +| 1.0.1 | [edition-bordeaux](../../../tree/edition-bordeaux) | Current version. | ## Examples * [Simple example](../examples/events/EiffelTestCaseFinishedEvent/simple.json) \ No newline at end of file diff --git a/eiffel-vocabulary/EiffelTestExecutionRecipeCollectionCreatedEvent.md b/eiffel-vocabulary/EiffelTestExecutionRecipeCollectionCreatedEvent.md index 3d616805..ba1efe4b 100644 --- a/eiffel-vocabulary/EiffelTestExecutionRecipeCollectionCreatedEvent.md +++ b/eiffel-vocabulary/EiffelTestExecutionRecipeCollectionCreatedEvent.md @@ -24,7 +24,7 @@ How the test selection service generates the recipe collection is, from the poin The __data__ object consists of two main parts. __data.selectionStrategy__ identifies the strategy used to select the test cases and generate the recipe collection, while __data.batches__ or __data.batchesUri__ contain or reference, respectively, the recipes. The recipes are grouped in batches, which are used to control the order of execution of test cases. Every batch has a priority to let the test executor order them in sequence, but within each batch no assumptions are made as to the execution order the test cases. This way the recipe collection can either allow the executor a high degree of freedom in scheduling the test executions, and/or prescribe the exact sequential order in which they must be executed. Each event SHALL include one and only one of __data.batches__ and __data.batchesUri__. -Finally, each recipe (__data.batches.recipes__) consists of two parts: the test case to execute, and the constraints of that execution. The EiffelTestExecutionRecipeCollectionCreatedEvent does control the syntax of these constraints, as the nature of such constraints are highly dependent on technology domain and test execution framework. That being said, there are three questions that typically need to be answered: what is the item under test, in what kind of environment is it to be tested, and what are the test parameters? Note the distinction between test case and test execution: it is perfectly legal for a single test case to appear multiple times within the same EiffelTestExecutionRecipeCollectionCreatedEvent, but (presumably) with different constraints. +Finally, each recipe (__data.batches.recipes__) consists of two parts: the test case to execute, and the constraints of that execution. The EiffelTestExecutionRecipeCollectionCreatedEvent does not control the syntax of these constraints, as the nature of such constraints are highly dependent on technology domain and test execution framework. That being said, there are three questions that typically need to be answered: what is the item under test, in what kind of environment is it to be tested, and what are the test parameters? Note the distinction between test case and test execution: it is perfectly legal for a single test case to appear multiple times within the same EiffelTestExecutionRecipeCollectionCreatedEvent, but (presumably) with different constraints. ## Data Members ### data.selectionStrategy diff --git a/examples/events/EiffelTestCaseCanceled/simple.json b/examples/events/EiffelTestCaseCanceledEvent/simple.json similarity index 100% rename from examples/events/EiffelTestCaseCanceled/simple.json rename to examples/events/EiffelTestCaseCanceledEvent/simple.json diff --git a/examples/events/EiffelTestCaseFinishedEvent/simple.json b/examples/events/EiffelTestCaseFinishedEvent/simple.json index 90475b37..508dec83 100644 --- a/examples/events/EiffelTestCaseFinishedEvent/simple.json +++ b/examples/events/EiffelTestCaseFinishedEvent/simple.json @@ -1,7 +1,7 @@ { "meta": { "type": "EiffelTestCaseFinishedEvent", - "version": "1.0.0", + "version": "1.0.1", "time": 1234567890, "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0" }, diff --git a/schemas/EiffelActivityTriggeredEvent/1.0.0.json b/schemas/EiffelActivityTriggeredEvent/1.0.0.json index c3985772..08029f9c 100644 --- a/schemas/EiffelActivityTriggeredEvent/1.0.0.json +++ b/schemas/EiffelActivityTriggeredEvent/1.0.0.json @@ -113,7 +113,14 @@ "type": "object", "properties": { "type": { - "type": "string" + "type": "string", + "enum": [ + "MANUAL", + "EIFFEL_EVENT", + "SOURCE_CHANGE", + "TIMER", + "OTHER" + ] }, "description": { "type": "string" diff --git a/schemas/EiffelTestCaseFinishedEvent/1.0.0.json b/schemas/EiffelTestCaseFinishedEvent/1.0.1.json similarity index 99% rename from schemas/EiffelTestCaseFinishedEvent/1.0.0.json rename to schemas/EiffelTestCaseFinishedEvent/1.0.1.json index 8ad36180..bdb6107e 100644 --- a/schemas/EiffelTestCaseFinishedEvent/1.0.0.json +++ b/schemas/EiffelTestCaseFinishedEvent/1.0.1.json @@ -14,7 +14,7 @@ }, "version": { "type": "string", - "enum": [ "1.0.0" ], + "enum": [ "1.0.0", "1.0.1" ], "default": "1.0.0" }, "time": { diff --git a/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json b/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json index 22fa6158..51052902 100644 --- a/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json +++ b/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json @@ -129,7 +129,14 @@ "type": "object", "properties": { "type": { - "type": "string" + "type": "string", + "enum": [ + "MANUAL", + "EIFFEL_EVENT", + "SOURCE_CHANGE", + "TIMER", + "OTHER" + ] }, "description": { "type": "string" diff --git a/schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/1.0.0.json b/schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/1.0.0.json index 5156bb67..86d9153f 100644 --- a/schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/1.0.0.json +++ b/schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/1.0.0.json @@ -163,8 +163,7 @@ }, "required": [ "id", - "testCase", - "constraints" + "testCase" ], "additionalProperties": false } From dba7b8795c84ab19502f2e9445800c42aec7e08c Mon Sep 17 00:00:00 2001 From: UMADEVI KAPU Date: Fri, 30 Jun 2017 19:43:15 +0530 Subject: [PATCH 2/4] Added "type":"object" in schema file of EiffelTestCaseTriggeredEvent --- schemas/EiffelTestCaseTriggeredEvent/1.0.0.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json b/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json index 51052902..d5040379 100644 --- a/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json +++ b/schemas/EiffelTestCaseTriggeredEvent/1.0.0.json @@ -160,6 +160,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "properties": { "name": { "type": "string" From 339dad90b6796fb8756af12c8e54b4d0ac1a7741 Mon Sep 17 00:00:00 2001 From: UMADEVI KAPU Date: Mon, 3 Jul 2017 12:25:11 +0530 Subject: [PATCH 3/4] Added 1.0.0.json for TCF event in schema --- .../EiffelTestCaseFinishedEvent/1.0.0.json | 215 ++++++++++++++++++ .../EiffelTestCaseFinishedEvent/1.0.1.json | 4 +- 2 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 schemas/EiffelTestCaseFinishedEvent/1.0.0.json diff --git a/schemas/EiffelTestCaseFinishedEvent/1.0.0.json b/schemas/EiffelTestCaseFinishedEvent/1.0.0.json new file mode 100644 index 00000000..7fd4c047 --- /dev/null +++ b/schemas/EiffelTestCaseFinishedEvent/1.0.0.json @@ -0,0 +1,215 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ "EiffelTestCaseFinishedEvent" ] + }, + "version": { + "type": "string", + "enum": [ "1.0.0" ], + "default": "1.0.0" + }, + "time": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "source": { + "type": "object", + "properties": { + "domainId": { + "type": "string" + }, + "host": { + "type": "string" + }, + "name": { + "type": "string" + }, + "serializer": { + "type": "object", + "properties": { + "groupId": { + "type": "string" + }, + "artifactId": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "groupId", + "artifactId", + "version" + ], + "additionalProperties": false + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "security": { + "type": "object", + "properties": { + "sdm": { + "type": "object", + "properties": { + "authorIdentity": { + "type": "string" + }, + "encryptedDigest": { + "type": "string" + } + }, + "required": [ + "authorIdentity", + "encryptedDigest" + ], + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "version", + "time" + ], + "additionalProperties": false + }, + "data": { + "type": "object", + "properties": { + "outcome": { + "type": "object", + "properties": { + "verdict": { + "type": "string", + "enum": [ + "PASSED", + "FAILED", + "INCONCLUSIVE" + ] + }, + "conclusion": { + "type": "string", + "enum": [ + "SUCCESSFUL", + "FAILED", + "ABORTED", + "TIMED_OUT", + "INCONCLUSIVE" + ] + }, + "description": { + "type": "string" + }, + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + } + }, + "additionalProperties": false + } + } + }, + "required": [ + "verdict", + "conclusion" + ], + "additionalProperties": false + }, + "persistentLogs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "name", + "uri" + ], + "additionalProperties": false + } + }, + "customData": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outcome" + ], + "additionalProperties": false + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "type", + "target" + ], + "additionalProperties": false + } + } + }, + "required": [ + "meta", + "data", + "links" + ], + "additionalProperties": false +} diff --git a/schemas/EiffelTestCaseFinishedEvent/1.0.1.json b/schemas/EiffelTestCaseFinishedEvent/1.0.1.json index bdb6107e..67ca145a 100644 --- a/schemas/EiffelTestCaseFinishedEvent/1.0.1.json +++ b/schemas/EiffelTestCaseFinishedEvent/1.0.1.json @@ -14,8 +14,8 @@ }, "version": { "type": "string", - "enum": [ "1.0.0", "1.0.1" ], - "default": "1.0.0" + "enum": [ "1.0.1" ], + "default": "1.0.1" }, "time": { "type": "integer" From 82ffa2b7227e79b409e93c4f88f68772bf3932dd Mon Sep 17 00:00:00 2001 From: UMADEVI KAPU Date: Mon, 3 Jul 2017 13:11:17 +0530 Subject: [PATCH 4/4] Added version history in EiffelTestCaseFinishedEvent.md file --- eiffel-vocabulary/EiffelTestCaseFinishedEvent.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md b/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md index 8116339a..4b6ae201 100644 --- a/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md +++ b/eiffel-vocabulary/EiffelTestCaseFinishedEvent.md @@ -86,7 +86,9 @@ __Description:__ The URI at which the log can be retrieved. ## Version History | Version | Introduced in | Changes | | --------- | ------------------------------------------------------ | --------------------------------------- | -| 1.0.1 | [edition-bordeaux](../../../tree/edition-bordeaux) | Current version. | +| 1.0.1 | Current version | data.outcome.metrics.value and data.outcome.metrics.name made mandatory. | +| 1.0.0 | [edition-bordeaux](../../../tree/edition-bordeaux) | Initial version. | + ## Examples * [Simple example](../examples/events/EiffelTestCaseFinishedEvent/simple.json) \ No newline at end of file