Skip to content

Commit

Permalink
Introduced EiffelTestCaseTriggeredEvent and EiffelTestCaseCanceledEve…
Browse files Browse the repository at this point in the history
…nt (#134)

As per issue #120.

Introduced two new events - EiffelTestCaseTriggeredEvent and EiffelTestCaseCanceledEvent - to bring test case execution representation in line with activity execution. The introduction of these additional events enables expression of concepts which were previously inexpressible, such as planned test scope and queuing times. Documentatin, schemas, examples and reference data updated accordingly.
  • Loading branch information
d-stahl-ericsson committed Apr 12, 2017
1 parent 935cf3d commit 316f2b1
Show file tree
Hide file tree
Showing 25 changed files with 810 additions and 187 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ __IMPORTANT NOTICE:__ The contents of this repository currectly reflect a __DRAF
1. [EiffelSourceChangeCreatedEvent (SCC)](./eiffel-vocabulary/EiffelSourceChangeCreatedEvent.md)
1. [EiffelSourceChangeSubmittedEvent (SCS)](./eiffel-vocabulary/EiffelSourceChangeSubmittedEvent.md)
1. [EiffelFlowContextDefinedEvent (FCD)](./eiffel-vocabulary/EiffelFlowContextDefinedEvent.md)
1. [EiffelTestCaseTriggeredEvent (TCT)](./eiffel-vocabulary/EiffelTestCaseTriggeredEvent.md)
1. [EiffelTestCaseCanceledEvent (TCC)](./eiffel-vocabulary/EiffelTestCaseCanceledEvent.md)
1. [EiffelTestCaseStartedEvent (TCS)](./eiffel-vocabulary/EiffelTestCaseStartedEvent.md)
1. [EiffelTestCaseFinishedEvent (TCF)](./eiffel-vocabulary/EiffelTestCaseFinishedEvent.md)
1. [EiffelTestSuiteStartedEvent (TSS)](./eiffel-vocabulary/EiffelTestSuiteStartedEvent.md)
Expand Down
10 changes: 5 additions & 5 deletions eiffel-syntax-and-usage/the-links-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,20 @@ __Multiple allowed:__ No
__Description:__ Identifies the relevant test suite execution. In other words, [EiffelTestSuiteStartedEvent](../eiffel-vocabulary/EiffelTestSuiteStartedEvent.md) acts as a handle for a particular test suite execution.

### TEST_CASE_EXECUTION
__Required in:__ [EiffelTestCaseFinishedEvent](../eiffel-vocabulary/EiffelTestCaseFinishedEvent.md)
__Required in:__ [EiffelTestCaseStartedEvent](../eiffel-vocabulary/EiffelTestCaseStartedEvent.md), [EiffelTestCaseFinishedEvent](../eiffel-vocabulary/EiffelTestCaseFinishedEvent.md), [EiffelTestCaseCanceledEvent](../eiffel-vocabulary/EiffelTestCaseCanceledEvent.md)
__Optional in:__ None
__Legal targets:__ [EiffelTestCaseStartedEvent](../eiffel-vocabulary/EiffelTestCaseStartedEvent.md)
__Legal targets:__ [EiffelTestCaseTriggeredEvent](../eiffel-vocabulary/EiffelTestCaseTriggeredEvent.md)
__Multiple allowed:__ No
__Description:__ Identifies the relevant test case execution. In other words, [EiffelTestCaseStartedEvent](../eiffel-vocabulary/EiffelTestCaseStartedEvent.md) acts as a handle for a particular test case execution.
__Description:__ Identifies the relevant test case execution. In other words, [EiffelTestCaseTriggeredEvent](../eiffel-vocabulary/EiffelTestCaseTriggeredEvent.md) acts as a handle for a particular test case execution. This differs from __CONTEXT__. In __TEST_CASE_EXECUTION__ the source carries information pertaining to the target (i.e. the test case execution started, finished or was canceled). In __CONTEXT__, on the other hand, the source constitutes a subset of the target (e.g. this test case was executed as part of that activity or test suite).

### IUT
__Required in:__ [EiffelTestCaseStartedEvent](../eiffel-vocabulary/EiffelTestCaseStartedEvent.md),
__Required in:__ [EiffelTestCaseTriggeredEvent](../eiffel-vocabulary/EiffelTestCaseTriggeredEvent.md),
[EiffelIssueVerifiedEvent](../eiffel-vocabulary/EiffelIssueVerifiedEvent.md)
__Optional in:__ None
__Legal targets:__ [EiffelArtifactCreatedEvent](../eiffel-vocabulary/EiffelArtifactCreatedEvent.md),
[EiffelCompositionDefinedEvent](../eiffel-vocabulary/EiffelCompositionDefinedEvent.md)
__Multiple allowed:__ No
__Description:__ Identifies the Item Under Test: what has been tested and/or been verified to address an issue.
__Description:__ Identifies the Item Under Test: what is about to be tested and/or has been verified to address an issue, respectively.

### TERC
__Required in:__ None
Expand Down
2 changes: 1 addition & 1 deletion eiffel-vocabulary/EiffelActivityTriggeredEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __Description:__ A description of the trigger.
__Type:__ String
__Required:__ No
__Legal values:__ MANUAL, SEMI_AUTOMATED, AUTOMATED, OTHER
__Description:__ The type of execution (often related to, but ultimately separate from, __data.trigger.type__).
__Description:__ The type of execution (often related to, but ultimately separate from, __data.triggers.type__).

## Version History
| Version | Introducing Commit |
Expand Down
33 changes: 33 additions & 0 deletions eiffel-vocabulary/EiffelTestCaseCanceledEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!---
Copyright 2017 Ericsson AB.
For a full list of individual contributors, please see the commit history.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->

# EiffelTestCaseCanceledEvent (TCC)
The EiffelTestCaseCanceledEvent declares that a previously triggered test case execution (represented by [EiffelTestCaseTriggeredEvent](./EiffelTestCaseTriggeredEvent.md)) has been canceled _before it has started_. This is typically used in queuing situations where a queued execution is dequeued. It is recommended that __CAUSE__ links be used to indicate the reason.

## Data Members
### data.reason
__Type:__ String
__Required:__ No
__Description:__ Any human readable information as to the reason for dequeueing.

## Version History
| Version | Introducing Commit |
| --------- | ------------------ |
| 1.0.0 | _Current version_ |

## Examples
* [Simple example](../examples/events/EiffelTestCaseCanceledEvent/simple.json)
53 changes: 1 addition & 52 deletions eiffel-vocabulary/EiffelTestCaseStartedEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,65 +16,14 @@
--->

# EiffelTestCaseStartedEvent (TCS)
The EiffelTestCaseStartedEvent declares that the execution of a test case has commenced. This can either be declared stand-alone or as part of an activity or test suite, using either a __CAUSE__ or a __CONTEXT__ link type, respectively.
The EiffelTestCaseStartedEvent declares that the execution of a test case has commenced. This event SHALL be preceded by a [EiffelTestCaseTriggeredEvent](./EiffelTestCaseTriggeredEvent.md), and appropriately linked to via __TEST_CASE_EXECUTION__.

## Data Members
### data.testCase
__Type:__ Object
__Required:__ Yes
__Description:__ Identification of the executed test case.

#### data.testCase.tracker
__Type:__ String
__Required:__ No
__Description:__ The name of the test case tracker - typically a test management system.

#### data.testCase.id
__Type:__ String
__Required:__ Yes
__Description:__ The unique identity of the executed test case.

#### data.testCase.version
__Type:__ String
__Required:__ No
__Description:__ The unique version of the executed test case identity. Where this property is not used it is assumed that test cases are not version controlled.

#### data.testCase.uri
__Type:__ String
__Required:__ No
__Description:__ A location where a description of the test case can be retrieved. To the extent that multiple versions of the same test case co-exist, this property SHALL identify the exact version executed.

### data.executor
__Type:__ String
__Required:__ No
__Description:__ The name of the test case executor, if applicable. This property can be used to identify tests executed by a particular test framework.

### data.recipeId
__Type:__ String
__Required:__ No
__Description:__ If this test case execution was the result of an Execution Recipe, as defined by an [EiffelTestExecutionRecipeCollectionCreatedEvent](./EiffelTestExecutionRecipeCollectionCreatedEvent.md), this UUID SHALL match the relevant __data.batches.recipes.id__ in that event.

### data.parameters
__Type:__ Object[]
__Required:__ No
__Description:__ A list of parameters passed to the test case execution.

#### data.parameters.name
__Type:__ String
__Required:__ Yes
__Description:__ The name of the parameter.

#### data.parameters.value
__Type:__ String
__Required:__ Yes
__Description:__ The value of the parameter.

### data.executionType
__Type:__ String
__Required:__ No
__Legal values:__ MANUAL, SEMI_AUTOMATED, AUTOMATED, OTHER
__Description:__ The type of test case execution.

### data.liveLogs
__Type:__ Object[]
__Required:__ No
Expand Down
102 changes: 102 additions & 0 deletions eiffel-vocabulary/EiffelTestCaseTriggeredEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!---
Copyright 2017 Ericsson AB.
For a full list of individual contributors, please see the commit history.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->

# EiffelTestCaseTriggeredEvent (TCT)
The EiffelTestCaseTriggeredEvent declares that the execution of a test case has been triggered, but not yet started. This can either be declared stand-alone or as part of an activity or test suite, using either a __CAUSE__ or a __CONTEXT__ link type, respectively.

This event is used to communicate intent, and thereby serves a similar purpose to that of [EiffelActivityTriggeredEvent](./EiffelActivityTriggeredEvent.md). A triggered test case execution is expected to either be started (represented by [EiffelTestCaseStartedEvent](./EiffelTestCaseStartedEvent.md)) or canceled (represented by [EiffelTestCaseCanceledEvent](./EiffelTestCaseCanceledEvent.md)). Consequently, any delay between triggering and execution can be assumed to imply queuing time (e.g. waiting for available test resources) and monitored as such.

## Data Members
### data.testCase
__Type:__ Object
__Required:__ Yes
__Description:__ Identification of the test case to be executed.

#### data.testCase.tracker
__Type:__ String
__Required:__ No
__Description:__ The name of the test case tracker - typically a test management system.

#### data.testCase.id
__Type:__ String
__Required:__ Yes
__Description:__ The unique identity of the test case to be executed.

#### data.testCase.version
__Type:__ String
__Required:__ No
__Description:__ The unique version of the identified test case to be executed. Where this property is not used it is assumed that test cases are not version controlled.

#### data.testCase.uri
__Type:__ String
__Required:__ No
__Description:__ A location where a description of the test case can be retrieved. To the extent that multiple versions of the same test case co-exist, this property SHALL identify the exact version to be executed.

### data.recipeId
__Type:__ String
__Required:__ No
__Description:__ If triggering this test case execution was the result of an Execution Recipe, as defined by an [EiffelTestExecutionRecipeCollectionCreatedEvent](./EiffelTestExecutionRecipeCollectionCreatedEvent.md), this UUID SHALL match the relevant __data.batches.recipes.id__ in that event.

### data.triggers
__Type:__ Object[]
__Required:__ No
__Description:__ The circumstances triggering the test case execution.

#### data.triggers.type
__Type:__ String
__Required:__ Yes
__Legal values:__ MANUAL, EIFFEL_EVENT, SOURCE_CHANGE, TIMER, OTHER
__Description:__ The type of trigger.
MANUAL signifies that the test case execution was manually triggered.
EIFFEL_EVENT signifies that the test case execution was triggered by one or more Eiffel events. These events should be represented via __CAUSE__ links.
SOURCE_CHANGE signifies that the test case execution was triggered as a consequence of a detected source change __not__ represented by Eiffel events.
TIMER signifies that the test case execution was triggered by a timer.
OTHER signifies any other triggering cause.

#### data.triggers.description
__Type:__ String
__Required:__ No
__Description:__ A description of the trigger.

### data.executionType
__Type:__ String
__Required:__ No
__Legal values:__ MANUAL, SEMI_AUTOMATED, AUTOMATED, OTHER
__Description:__ The type of execution (often related to, but ultimately separate from, __data.triggers.type__).

### data.parameters
__Type:__ Object[]
__Required:__ No
__Description:__ A list of parameters to be passed to the test case execution.

#### data.parameters.name
__Type:__ String
__Required:__ Yes
__Description:__ The name of the parameter.

#### data.parameters.value
__Type:__ String
__Required:__ Yes
__Description:__ The value of the parameter.

## Version History
| Version | Introducing Commit |
| --------- | ------------------ |
| 1.0.0 | _Current version_ |

## Examples
* [Simple example](../examples/events/EiffelTestCaseTriggeredEvent/simple.json)
21 changes: 21 additions & 0 deletions examples/events/EiffelTestCaseCanceled/simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"meta": {
"type": "EiffelTestCaseCanceledEvent",
"version": "1.0.0",
"time": 1234567890,
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
},
"data": {
"reason": "Skipping this test execution due to new IUT version becoming available."
},
"links": [
{
"type": "CAUSE",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1"
},
{
"type": "TEST_CASE_EXECUTION",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2"
}
]
}
28 changes: 1 addition & 27 deletions examples/events/EiffelTestCaseStartedEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,7 @@
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
},
"data": {
"testCase": {
"tracker": "My Test Management System",
"id": "TC-1234",
"version": "42",
"uri": "http://tm.company.com/browse/TC-1234/42"
},
"executor": "My Test Framework",
"recipeId": "aaaaaaaa-bbbb-5ccc-addd-eeeeeeeeeee0",
"parameters": [
{
"name": "login",
"value": "admin"
}
],
"executionType": "AUTOMATED",
"liveLogs": [
{
"name": "My test log",
Expand All @@ -29,21 +15,9 @@
]
},
"links": [
{
"type": "CONTEXT",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1"
},
{
"type": "IUT",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2"
},
{
"type": "ENVIRONMENT",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3"
},
{
"type": "TERC",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee4"
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1"
}
]
}
46 changes: 46 additions & 0 deletions examples/events/EiffelTestCaseTriggeredEvent/simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"meta": {
"type": "EiffelTestCaseTriggeredEvent",
"version": "1.0.0",
"time": 1234567890,
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"security": {
"sdm": {
"authorIdentity": "My Test Management System",
"encryptedDigest": "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a"
}
}
},
"data": {
"testCase": {
"tracker": "My Test Management System",
"id": "TC-1234",
"version": "42",
"uri": "http://tm.company.com/browse/TC-1234/42"
},
"recipeId": "aaaaaaaa-bbbb-5ccc-addd-eeeeeeeeeee0",
"parameters": [
{
"name": "login",
"value": "admin"
}
],
"executionType": "AUTOMATED",
"triggers": [
{
"type": "TIMER",
"description": "Nightly test timer."
}
]
},
"links": [
{
"type": "CONTEXT",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1"
},
{
"type": "IUT",
"target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2"
}
]
}

0 comments on commit 316f2b1

Please sign in to comment.