Skip to content

Commit

Permalink
Minor issues fixed (#146)
Browse files Browse the repository at this point in the history
Minor bugs listed in issue #145 fixed:
* Several cases of mismatching event documentation and schemas
* EiffelTestCaseFinishedEvent stepped to 1.0.1 due to two properties being made mandatory
* Typos fixed
  • Loading branch information
Umadevi-Kapu authored and d-stahl-ericsson committed Jul 4, 2017
1 parent 11a801d commit 0a2f9ef
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 13 deletions.
8 changes: 5 additions & 3 deletions eiffel-vocabulary/EiffelTestCaseFinishedEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -86,7 +86,9 @@ __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 | 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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/events/EiffelTestCaseFinishedEvent/simple.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"meta": {
"type": "EiffelTestCaseFinishedEvent",
"version": "1.0.0",
"version": "1.0.1",
"time": 1234567890,
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
},
Expand Down
9 changes: 8 additions & 1 deletion schemas/EiffelActivityTriggeredEvent/1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@
"type": "object",
"properties": {
"type": {
"type": "string"
"type": "string",
"enum": [
"MANUAL",
"EIFFEL_EVENT",
"SOURCE_CHANGE",
"TIMER",
"OTHER"
]
},
"description": {
"type": "string"
Expand Down
4 changes: 0 additions & 4 deletions schemas/EiffelTestCaseFinishedEvent/1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@
"value": {
}
},
"required": [
"name",
"value"
],
"additionalProperties": false
}
}
Expand Down
219 changes: 219 additions & 0 deletions schemas/EiffelTestCaseFinishedEvent/1.0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"$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.1" ],
"default": "1.0.1"
},
"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": {
}
},
"required": [
"name",
"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
}
10 changes: 9 additions & 1 deletion schemas/EiffelTestCaseTriggeredEvent/1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@
"type": "object",
"properties": {
"type": {
"type": "string"
"type": "string",
"enum": [
"MANUAL",
"EIFFEL_EVENT",
"SOURCE_CHANGE",
"TIMER",
"OTHER"
]
},
"description": {
"type": "string"
Expand All @@ -153,6 +160,7 @@
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@
},
"required": [
"id",
"testCase",
"constraints"
"testCase"
],
"additionalProperties": false
}
Expand Down

0 comments on commit 0a2f9ef

Please sign in to comment.