Skip to content

Latest commit

 

History

History
196 lines (168 loc) · 13.6 KB

the-links-object.md

File metadata and controls

196 lines (168 loc) · 13.6 KB

The Links Object

The links object is an array of trace links to other Eiffel events. These trace links by definition always reference backwards in time – it is only possible to reference an event that has already occured. Each trace link is a tuple consisting of a type and a UUID corresponding to the meta.id of the target event, on String format.

Some link types allow multiple trace links, whereas others only allow one.

Example syntax of a simple links object:

"links": [
  {"type": "CAUSE", "target": "8f3e0f94-5d11-46e7-ae02-91efa15d2329"},
  {"type": "COMPOSITION", "target": "43ee71d2-6d91-496a-b9cf-d121ff1d1bcf"}
]

Legal Link Types

CAUSE

Required in: None
Optional in: Any
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 in: None
Optional in: Any
Legal targets: EiffelActivityTriggeredEvent, EiffelTestSuiteStartedEvent
Multiple allowed: No
Description: Identifies the activity or test suite of which the event constitutes a part. SHOULD not be used in conjunction with CAUSE, see above. Note that multiple layers may be modeled using CONTEXT, e.g. an activity being part of another activity.

FLOW_CONTEXT

Required in: None
Optional in: Any
Legal targets: EiffelFlowContextDefinedEvent
Multiple allowed: No
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.

ACTIVITY_EXECUTION

Required in: EiffelActivityCanceledEvent, EiffelActivityStartedEvent, EiffelActivityFinishedEvent
Optional in: None
Legal targets: EiffelActivityTriggeredEvent
Multiple allowed: No
Description: Declares the activity execution the event relates to. In other words, EiffelActivityTriggeredEvent acts as a handle for the activity execution. This differs from CONTEXT. In ACTIVITY_EXECUTION the source carries information pertaining to the target (i.e. the activity 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).

PREVIOUS_ACTIVITY_EXECUTION

Required in: None
Optional in: EiffelActivityStartedEvent
Legal targets: EiffelActivityTriggeredEvent
Multiple allowed: No
Description: Identifies the latest previous execution of the activity.

PREVIOUS_VERSION

Required in: None
Optional in: EiffelArtifactCreatedEvent, EiffelCompositionDefinedEvent, EiffelEnvironmentDefinedEvent, EiffelSourceChangeCreatedEvent, EiffelSourceChangeSubmittedEvent
Legal targets: EiffelArtifactCreatedEvent, EiffelCompositionDefinedEvent, EiffelEnvironmentDefinedEvent, EiffelSourceChangeCreatedEvent, EiffelSourceChangeSubmittedEvent
Multiple allowed: Yes
Description: Identifies a latest previous version (there may be more than one in case of merges) of the engineering artifact the event represents, e.g. the previous version of the artifact, the previous version of the composition etc. The target event type SHALL be the same as the source event type.

COMPOSITION

Required in: EiffelArtifactReusedEvent
Optional in: EiffelArtifactCreatedEvent
Legal targets: EiffelCompositionDefinedEvent
Multiple allowed: No
Description: Identifies the composition from which an artifact declared by EiffelArtifactCreatedEvent was built, or the composition for which an already existing artifact is declared reused by EiffelArtifactReusedEvent.

ENVIRONMENT

Required in: None
Optional in: EiffelArtifactCreatedEvent, EiffelTestCaseStartedEvent, EiffelIssueVerifiedEvent
Legal targets: EiffelEnvironmentDefinedEvent
Multiple allowed: No
Description: Identifies the environment in which an event occurred, e.g. in which environment an artifact was built or an issue was verified.

ARTIFACT

Required in: EiffelArtifactPublishedEvent
Optional in: None
Legal targets: EiffelArtifactCreatedEvent
Multiple allowed: No
Description: Identifies the artifact that was published.

SUBJECT

Required in: EiffelConfidenceLevelModifiedEvent
Optional in: None
Legal targets: EiffelCompositionDefinedEvent, EiffelArtifactCreatedEvent, EiffelSourceChangeCreatedEvent, EiffelSourceChangeSubmittedEvent
Multiple allowed: Yes
Description: Identifies a subject of the confidence level.

ELEMENT

Required in: None
Optional in: EiffelCompositionDefinedEvent
Legal targets: EiffelCompositionDefinedEvent, EiffelSourceChangeSubmittedEvent, EiffelArtifactCreatedEvent
Multiple allowed: Yes
Description: Identifies an element and/or sub-composition of the composition. The latter is particularly useful for documenting large and potentially decentralized compositions, and may be used to reduce the need to repeat large compositions in which only small parts are subject to frequent change.

BASE

Required in: None
Optional in: EiffelSourceChangeCreatedEvent
Legal targets: EiffelSourceChangeSubmittedEvent
Multiple allowed: No
Description: Identifies the base revision of the proposed change.

CHANGE

Required in: None
Optional in: EiffelSourceChangeSubmittedEvent
Legal targets: EiffelSourceChangeCreatedEvent
Multiple allowed: No
Description: Identifies the change that was submitted.

TEST_SUITE_EXECUTION

Required in: EiffelTestSuiteFinishedEvent
Optional in: None
Legal targets: EiffelTestSuiteStartedEvent
Multiple allowed: No
Description: Identifies the relevant test suite execution. In other words, EiffelTestSuiteStartedEvent acts as a handle for a particular test suite execution.

TEST_CASE_EXECUTION

Required in: EiffelTestCaseStartedEvent, EiffelTestCaseFinishedEvent, EiffelTestCaseCanceledEvent
Optional in: None
Legal targets: EiffelTestCaseTriggeredEvent
Multiple allowed: No
Description: Identifies the relevant test case execution. In other words, EiffelTestCaseTriggeredEvent 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: EiffelTestCaseTriggeredEvent, EiffelIssueVerifiedEvent
Optional in: None
Legal targets: EiffelArtifactCreatedEvent, EiffelCompositionDefinedEvent
Multiple allowed: No
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
Optional in: EiffelTestSuiteStartedEvent
Legal targets: EiffelTestExecutionRecipeCollectionCreatedEvent
Multiple allowed: No
Description: When declared in an EiffelTestSuiteStartedEvent, this link signifies that the test suite groups all test case executions resulting from the EiffelTestExecutionRecipeCollectionCreatedEvent.

MODIFIED_ANNOUNCEMENT

Required in: None
Optional in: EiffelAnnouncementPublishedEvent
Legal targets: EiffelAnnouncementPublishedEvent
Multiple allowed: No
Description: Identifies an announcement of which this event represents an update or modification, if any. Example usage is to declare the end to a previously announced situation.

SUB_CONFIDENCE_LEVEL

Required in: None
Optional in: EiffelConfidenceLevelModifiedEvent
Legal targets: EiffelConfidenceLevelModifiedEvent
Multiple allowed: Yes
Description: Used in events summarizing multiple confidence levels. Example use case: the confidence level "allTestsOk" summarizes the confidence levels "unitTestsOk, "scenarioTestsOk" and "deploymentTestsOk", and consequently links to them via SUB_CONFIDENCE_LEVEL. This is intended for purely descriptive, rather than prescriptive, use.

REUSED_ARTIFACT

Required in: EiffelArtifactReusedEvent
Optional in: None
Legal targets: EiffelArtifactCreatedEvent
Multiple allowed: No
Description: This link identifies the EiffelArtifactCreatedEvent that is reused; in other words, the artifact that is not rebuilt for a given composition.

VERIFICATION_BASIS

Required in: None
Optional in: EiffelIssueVerifiedEvent
Legal targets: EiffelTestCaseFinishedEvent, EiffelTestSuiteFinishedEvent
Multiple allowed: Yes
Description: Used to declare the basis on which the verification statement(s) of EiffelIssueVerifiedEvent have been issued.