---
title: CI Tests
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > DDSQL Reference > Data Directory > CI Tests
---

# CI Tests

This dataset represents CI test execution data collected by Datadog CI Visibility Test Optimization. It provides insights into test run status, duration, test-level metadata (framework, parameters, ITR, coverage), and related CI and Git context. This enables granular analysis of testing trends, flakiness, and efficiency across your CI workflows.

```
dd.ci_tests
```
Getting Started With Test Optimization 
{% icon name="icon-external-link" /%}
 CI Visibility Public Documentation 
{% icon name="icon-external-link" /%}
 
## Query Parameters

This dataset uses a **polymorphic table function**. You must specify parameters when querying.

| Parameter        | Type            | Required | Description                                                                                              |
| ---------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `columns`        | `array<string>` | Yes      | List of fields to return for each test execution (e.g., 'timestamp', '@ci.pipeline.id', '@test.status'). |
| `event_type`     | `string`        | No       | Optional event subtype; mapped to 'test_level'. (e.g., event_type => 'suite',)                           |
| `filter`         | `string`        | No       | Optional EVP search string. For example: filter => '@test.status:(pass OR fail) AND @git.branch:main'.   |
| `from_timestamp` | `string`        | No       | Lower time bound for the query; defaults to query context if omitted.                                    |
| `to_timestamp`   | `string`        | No       | Upper time bound for the query; defaults to query context if omitted.                                    |

## Example Queries

```sql
-- Fetch recent failed pipeline runs with basic repo context SELECT * FROM dd.ci_tests(
  columns => ARRAY[
    'timestamp',
    '@ci.pipeline.id',
    '@ci.pipeline.name',
    '@test.status',
    '@git.repository_url',
    '@git.branch',
    '@git.commit.sha'
  ],
  event_type => 'test',
  filter => '@test.status:(pass OR fail) AND @git.branch:main'
  ) AS (
    ts TIMESTAMP,
    pipeline_id VARCHAR,
    pipeline_name VARCHAR,
    status VARCHAR,
    repository_url VARCHAR,
    branch VARCHAR,
    commit_sha VARCHAR
);
```

## Fields

| Title                          | ID                                     | Type            | Data Type     | Description                                                                                                                                |
| ------------------------------ | -------------------------------------- | --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Timestamp                      | timestamp                              | core            | timestamp     | Time the CI test event was recorded (e.g., 1758787144000).                                                                                 |
| Duration (ns)                  | @duration                              | event_attribute | int64         | Total duration of the test run in nanoseconds (e.g., 41000000000).                                                                         |
| Test Framework                 | @test.framework                        | event_attribute | string        | Testing framework used to run the tests (e.g., jest).                                                                                      |
| Test Framework Version         | @test.framework_version                | event_attribute | string        | Version of the testing framework in use (e.g., 29.7.0).                                                                                    |
| Test Command                   | @test.command                          | event_attribute | string        | Full command or script used to execute the test run (e.g., 'jest test-unit --maxWorkers=12').                                              |
| Test Status                    | @test.status                           | event_attribute | string        | Result of the test execution (e.g., pass, fail).                                                                                           |
| Test Service                   | @test.service                          | event_attribute | string        | The tested service or environment (e.g., web-ui-tests-staging).                                                                            |
| Test Has Parameters            | @test.has_parameters                   | event_attribute | bool          | Indicates whether the test was parameterized (e.g., true).                                                                                 |
| Test Management Enabled        | @test.test_management.enabled          | event_attribute | bool          | Indicates whether test management integration is enabled (e.g., false).                                                                    |
| Code Coverage Enabled          | @test.code_coverage.enabled            | event_attribute | bool          | Indicates whether code coverage collection was enabled during the test run (e.g., true).                                                   |
| ITR Tests Skipping Enabled     | @test.itr.tests_skipping.enabled       | event_attribute | bool          | Indicates whether ITR test-skipping optimization was active (e.g., true).                                                                  |
| ITR Tests Skipped              | @test.itr.tests_skipping.tests_skipped | event_attribute | bool          | Indicates whether any tests were skipped by ITR (e.g., false).                                                                             |
| ITR Tests Skipped Count        | @test.itr.tests_skipping.count         | event_attribute | int64         | Number of tests skipped by ITR (e.g., 0).                                                                                                  |
| CI Provider Name               | @ci.provider.name                      | event_attribute | string        | Name of the CI provider (e.g., github, gitlab).                                                                                            |
| CI Pipeline ID                 | @ci.pipeline.id                        | event_attribute | string        | CI provider's unique identifier for the pipeline run (e.g., 18000893621-1).                                                                |
| CI Pipeline Name               | @ci.pipeline.name                      | event_attribute | string        | Pipeline or workflow file name (e.g., .github/workflows/claude.yml).                                                                       |
| CI Pipeline Number             | @ci.pipeline.number                    | event_attribute | int64         | CI provider's sequential run number for the pipeline (e.g., 3760859).                                                                      |
| CI Job Name                    | @ci.job.name                           | event_attribute | string        | Name of the CI job executed (e.g., claude-code-action).                                                                                    |
| CI Job URL                     | @ci.job.url                            | event_attribute | string        | URL linking directly to the job's provider page (e.g., https://github.com/.../job/51209691834).                                            |
| CI Node Labels                 | @ci.node.labels                        | event_attribute | array<string> | Labels assigned to the job node (e.g., ['arch:amd64', 'specific:true']).                                                                   |
| Git Branch                     | @git.branch                            | event_attribute | string        | Branch associated with this run (e.g., fbryden/build_suppressions_sds_context).                                                            |
| Git Default Branch             | @git.default_branch                    | event_attribute | string        | Default repository branch (e.g., main).                                                                                                    |
| Git Commit SHA                 | @git.commit.sha                        | event_attribute | string        | Commit SHA for the triggering commit (e.g., dffcc683e2f78dad9228213fe2566dc3413b6b00).                                                     |
| Git Commit Message             | @git.commit.message                    | event_attribute | string        | Commit message for the triggering commit (e.g., Fix casing of suppressions).                                                               |
| Git Commit Author Name         | @git.commit.author.name                | event_attribute | string        | Author's name of the triggering commit (e.g., Frank Bryden).                                                                               |
| Git Commit Author Email        | @git.commit.author.email               | event_attribute | string        | Author's email of the triggering commit (e.g., frank.bryden@datadoghq.com).                                                                |
| Git Commit Committer Name      | @git.commit.committer.name             | event_attribute | string        | Committer's name of the triggering commit (e.g., Frank Bryden).                                                                            |
| Git Commit Committer Email     | @git.commit.committer.email            | event_attribute | string        | Committer's email of the triggering commit (e.g., frank.bryden@datadoghq.com).                                                             |
| Git Commit Committer Date      | @git.commit.committer.date             | event_attribute | string        | Commit time as a date string (e.g., 2025-09-24T16:10:18Z).                                                                                 |
| Git Commit Committer Timestamp | @git.commit.committer.date_timestamp   | event_attribute | timestamp     | Commit time as numeric timestamp (e.g., 1758730218000).                                                                                    |
| Git Repository URL             | @git.repository_url                    | event_attribute | string        | Repository URL (e.g., https://github.com/DataDog/dd-source.git).                                                                           |
| Git Repository Host            | @git.repository.host                   | event_attribute | string        | Repository host name (e.g., github.com).                                                                                                   |
| Git Repository Name            | @git.repository.name                   | event_attribute | string        | Repository name with owner (e.g., DataDog/examplerepo).                                                                                    |
| Event ID                       | id                                     | core            | string        | A unique identifier for the event.                                                                                                         |
| Discovery Timestamp            | discovery_timestamp                    | core            | int64         | The time when Datadog first received the event (milliseconds since Unix epoch). May differ from timestamp if there was an ingestion delay. |
| Tiebreaker                     | tiebreaker                             | core            | int64         | A value used to establish deterministic ordering among events that share the same timestamp.                                               |
| Ingest Size                    | ingest_size_in_bytes                   | core            | int64         | The size of the event payload in bytes at the time of ingestion, before any processing.                                                    |
| Random Draw                    | random_draw                            | core            | float64       | A random value between 0.0 and 1.0 assigned at ingestion, useful for consistent sampling across queries.                                   |
