Incidents
When a test case fails, Collate opens an incident for it. In Collate 2.0, an incident is a task with categoryIncident and type TestCaseResolution. Use the task endpoints to read incidents and change their status.
List and Retrieve Incidents
Find incidents by test case, status, assignee, or time, and read one incident and its history.
Change Incident Status
Acknowledge, assign, reassign, and resolve an incident.
How Incidents Are Modeled
- Creation: a failed test result creates an incident for the test case, or reuses the incident that is already open. Collate doesn’t open a second incident while one is open for the same test case. The test case owners become the assignees. If the test case has owners, the incident moves directly to the
assignedstage. - Identity: the incident ID is the task ID. The same value appears as
stateIdin the incident status history. - Stages: an incident moves through the stages in the following table. Each stage maps to a task status and to a legacy incident status.
- Resolution: resolving an incident requires a comment and a failure reason:
FalsePositive,MissingData,Duplicates,OutOfBounds, orOther. - Automatic closure: if automatic incident closure is enabled, a passing test result resolves the open incident.
availableTransitions, which lists the transitions that apply to the incident right now. Each item has id, label, targetStageId, targetTaskStatus, and requiresComment.
Two Sets of Endpoints
Incident reads and writes are available through two endpoint families. Use the task endpoints for new integrations.The test case incident status endpoint is the incident history that Collate maintains alongside the task. Each task change adds a record to it. Incidents created before the Collate 2.0 upgrade have history records that aren’t linked to a task.
SDK Support
Use the following options to work with incidents from code.- Python: Collate has no fluent SDK class for incidents. Use the
OpenMetadataclient. Task methods (list_tasks,get_task,resolve_task, and others) come frommetadata.ingestion.ometa.mixins.task_mixin, with models inmetadata.ingestion.ometa.task_models. For incident history reads, call the REST path throughmetadata.client. - Java:
client.tasks()for tasks andclient.testCaseResolutionStatuses()for incident history.