Skip to main content

Incidents

When a test case fails, Collate opens an incident for it. In Collate 2.0, an incident is a task with category Incident 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.
To see the workflow in the UI, see Incident Manager. To receive a webhook when an incident changes, see Alert for Incident Events.

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 assigned stage.
  • Identity: the incident ID is the task ID. The same value appears as stateId in 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, or Other.
  • Automatic closure: if automatic incident closure is enabled, a passing test result resolves the open incident.
Every task response includes 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 OpenMetadata client. Task methods (list_tasks, get_task, resolve_task, and others) come from metadata.ingestion.ometa.mixins.task_mixin, with models in metadata.ingestion.ometa.task_models. For incident history reads, call the REST path through metadata.client.
  • Java: client.tasks() for tasks and client.testCaseResolutionStatuses() for incident history.