Skip to content

Latest commit

 

History

History
275 lines (223 loc) · 15.1 KB

EiffelTestCaseTriggeredEvent.md

File metadata and controls

275 lines (223 loc) · 15.1 KB

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. A triggered test case execution is expected to either be started (represented by EiffelTestCaseStartedEvent) or canceled (represented by EiffelTestCaseCanceledEvent). 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, 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.

Links

This section describes which link types are valid for this event type. For details on how to express the link objects themselves see The Links Object.

CAUSE

Required: No
Legal targets: Any
Multiple allowed: Yes
Description: Identifies a cause of the event occurring. SHOULD not be used in conjunction with CONTEXT: individual events providing CAUSE within a larger context gives rise to ambiguity. It is instead recommended to let the root event of the context declare CAUSE.

CONTEXT

Required: No
Legal targets: EiffelActivityTriggeredEvent, EiffelTestSuiteStartedEvent
Multiple allowed: No
Description: Identifies the activity or test suite of which this event constitutes a part.

FLOW_CONTEXT

Required: No
Legal targets: EiffelFlowContextDefinedEvent
Multiple allowed: Yes
Description: Identifies the flow context of the event: which is the continuous integration and delivery flow in which this occurred – e.g. which product, project, track or version this is applicable to.

IUT

Required: Yes
Legal targets: EiffelArtifactCreatedEvent, EiffelArtifactDeployedEvent, EiffelCompositionDefinedEvent, EiffelSourceChangeCreatedEvent, EiffelSourceChangeSubmittedEvent
Multiple allowed: No
Description: Identifies the Implementation Under Test; in other words, the entity that is about to be tested.

ORIGINAL_TRIGGER

Required: No
Legal targets: EiffelTestCaseTriggeredEvent
Multiple allowed: No
Description: Used when the current test case execution is a new attempt at completing a previous test case execution, typically because the previous one failed. Although this activity may have been manually triggered and thus lacks a cause that can be described with Eiffel, this link can be used to convey the second-order cause.

PRECURSOR

Required: No
Legal targets: EiffelTestCaseTriggeredEvent
Multiple allowed: Yes
Description: Used to declare temporal relationships between activities in a pipeline, i.e. what other activity/activities preceded this activity. This link type applies primarily to non event-triggered activities. For more information on the usage of this link type please see Activity Linking.

Meta Members

meta.id

Type: String
Format: UUID
Required: Yes
Description: The unique identity of the event, generated at event creation.

meta.type

Type: String
Format: An event type name
Required: Yes
Description: The type of event. This field is required by the recipient of the event, as each event type has a specific meaning and a specific set of members in the data and links objects.

meta.version

Type: String
Format: Semantic Versioning 2.0.0
Required: Yes
Description: The version of the event type. This field is required by the recipient of the event to interpret the contents. Please see Versioning for more information.

meta.time

Type: Integer
Format: UNIX Epoch time, in milliseconds.
Required: Yes
Description: The event creation timestamp.

meta.tags

Type: String[]
Format: Free text
Required: No
Description: Any tags or keywords associated with the events, for searchability purposes.

meta.source

Type: Object
Required: No
Description: A description of the source of the event. This object is primarily for traceability purposes, and while optional, some form of identification of the source is HIGHLY RECOMMENDED. It offers multiple methods of identifying the source of the event, techniques which may be select from based on the technology domain and needs in any particular use case.

meta.source.domainId

Type: String
Format: Free text
Required: No
Description: Identifies the domain that produced an event.

meta.source.host

Type: String
Format: Hostname
Required: No
Description: The hostname of the event sender.

meta.source.name

Type: String
Format: Free text
Required: No
Description: The name of the event sender.

meta.source.serializer

Type: String
Format: purl specification
Required: No
Description: The identity of the serializer software used to construct the event, in purl format.

meta.source.uri

Type: String
Format: URI
Required: No
Description: The URI of, related to or describing the event sender.

meta.security

Type: Object
Required: No
Description: An optional object for enclosing security related information, particularly supporting data integrity. See Security for further information.

meta.security.authorIdentity

Type: String
Format: Distinguished Name
Required: Yes
Description: The identity of the author of the event. This property is intended to enable the recipient to identify the author of the event contents and/or look up the appropriate public key for decrypting the meta.security.integrityProtection.signature value and thereby verifying author identity and data integrity.

meta.security.integrityProtection

Type: Object
Required: No
Description: An optional object for enabling information integrity protection via cryptographic signing. To generate a correct meta.security.integrityProtection object:

  1. Generate the entire event, but with the meta.security.integrityProtection.signature value set to an empty string.
  2. Serialize the event on Canonical JSON Form.
  3. Generate the signature using the meta.security.integrityProtection.alg algorithm.
  4. Set the meta.security.integrityProtection.signature value to the resulting signature while maintaining Canonical JSON Form. To verify the integrity of the event, the consumer then resets meta.security.integrityProtection.signature to an empty string and ensures Canonical JSON Form before verifying the signature.
meta.security.integrityProtection.signature

Type: String
Required: Yes
Description: The signature produced by the signing algorithm.

meta.security.integrityProtection.alg

Type: String
Format: A valid JWA RFC 7518 alg parameter value, excluding "none"
Required: Yes
Description: The cryptographic algorithm used to digitally sign the event. If no signing is performed, the meta.security.integrityProtection SHALL be omitted rather than setting meta.security.integrityProtection.alg to "none".

meta.security.integrityProtection.publicKey

Type: String
Required: No
Description: The producer of the event may include the relevant public key for convenience, rather than relying a separate key distribution mechanism. Note that this property, along with the rest of the event, is encompassed by the integrity protection offered via meta.security.integrityProtection.

meta.security.sequenceProtection

Type: Object[]
Required: No
Description: An optional object for enabling verification of intact event sequences in a distributed environment, thereby protecting against data loss, race conditions and replay attacks. It allows event publishers to state the order in which they produce a certain set of events. In other words, it cannot provide any global guarantees as to event sequencing, but rather per-publisher guarantees. Every object in the array represents a named sequence of which this event forms a part. For every event including a given named sequence, the publisher SHALL increment meta.security.sequenceProtection.position by 1. The first event produced in a given named sequence SHALL numbered 1.

meta.security.sequenceProtection.sequenceName

Type: String
Required: Yes
Description: The name of the sequence. There MUST not be two identical meta.security.sequenceProtection.sequenceName values in the same event.

meta.security.sequenceProtection.position

Type: Integer
Required: Yes
Description: The number of the event within the named sequence.

meta.schemaUri

Type: String
Format: URI
Required: No
Description: A URI pointing at a location from where the schema used when creating this event can be retrieved. It can be used to parse event data for validation and extraction purposes, for example. Note, that the schema on that URI should be considered immutable.

Version History

Version Introduced in Changes
3.5.1 Not yet released in an edition Change IUT to Implementation Under Test (see Issue 235).
3.5.0 edition-orizaba Add ORIGINAL_TRIGGER link (see Issue 246).
3.4.0 edition-orizaba Add artifact deployed event as legal IUT target (see Issue 239).
3.3.0 edition-orizaba Add SCS and SCC as legal target for IUT in TCT (see Issue 317).
3.2.0 edition-arica Add schema URL to the meta object (see Issue 280).
3.1.0 edition-lyon Add links.domainId member (see Issue 233).
3.0.0 edition-agen Improved information integrity protection (see Issue 185).
2.0.0 edition-agen Introduced purl identifiers instead of GAVs (see Issue 182)
1.1.0 edition-toulouse Multiple links of type FLOW_CONTEXT allowed.
1.0.0 edition-bordeaux Initial version.

Examples