Currents Documentation
Currents.devGitHubChangelog
  • Getting Started
    • What is Currents?
    • Playwright
      • Playwright: Quick Start
      • Troubleshooting Playwright
    • Cypress
      • Your First Cypress Run
      • Integrating with Cypress
        • Compatibility
        • Alternative Cypress Binaries
      • Troubleshooting Cypress
    • Jest
      • Your First Jest Run
      • Detox + Jest
      • Troubleshooting Jest
    • Others
    • CI Setup
      • GitHub Actions
        • Cypress - GitHub Actions
        • Playwright - GitHub Actions
        • Jest - GitHub Actions
        • Node.js - GitHub Actions
        • Commit data for GitHub Actions
        • Custom Docker runners
        • Named Runners
      • GitLab
        • Cypress - GitLab CI/CD
        • Playwright - GitLab CI/CD
        • Custom Docker runners
      • Jenkins
        • Cypress - Jenkins
        • Playwright - Jenkins
      • CircleCI
        • Cypress - CircleCI
        • Playwright - CircleCI
      • Bitbucket
        • Cypress - Bitbucket Pipelines
      • Azure DevOps
        • Cypress - Azure DevOps
        • Playwright - Azure DevOps
      • AWS Code Build
        • Cypress - AWS Code Build
        • Playwright - AWS Code Build
      • NX
        • Playwright - NX
        • Cypress - NX
  • Guides
    • Record Key
    • CI Build ID
    • Reporting
      • Reporting Strategy
      • Reporting in CI
      • Step-Level Reporting
    • CI Optimization
      • Playwright Parallelization
      • Orchestration Setup
      • Fully Parallel Mode
      • Re-run Only Failed Tests
      • Cloud Spot Instances
      • Failing Fast
      • Load Balancing
    • Code Coverage
      • Code Coverage for Playwright
      • Code Coverage for Cypress
    • Currents Actions
      • Setup Currents Actions
      • Using Currents Actions
      • Reference
        • Conditions
        • Actions
    • Playwright Component Testing
    • Playwright Visual Testing
    • Playwright Annotations
    • Playwright Tags
    • MCP Server
  • Dashboard
    • Projects
      • Projects Summary view
      • Project Settings
      • Archive and Unarchive Projects
    • Runs
      • Run Status
      • Run Details
      • Commit Information
      • Tags
      • Run Timeouts
      • Cancelling Runs
      • Deleting Runs
      • Run Progress
    • Tests
      • Spec File Status
      • Test Status
      • Flaky Tests
      • Test History
    • Test Suite Explorer
      • Test Explorer
      • Spec Files Explorer
      • Error Explorer
      • Reference
  • Automated Reports
  • Insights and Analytics
  • Administration
    • Email Domain Based Access
    • SSO SAML2.0
      • SAML2.0 Configuration
      • SCIM User Provisioning
      • IdP-initiated Sessions
      • JumpCloud
        • JumpCloud User provisioning
      • Okta
        • Okta User provisioning
      • Troubleshooting SSO
    • Billing & Usage
  • Billing and Pricing
  • Resources
    • Reporters
      • cypress-cloud
        • Batched Orchestration
        • Migration to Cypress@13
      • @currents/cli
      • @currents/playwright
        • Configuration
        • pwc
        • pwc-p (orchestration)
        • Playwright Fixtures
      • @currents/jest
      • @currents/node-test-reporter
      • @currents/cmd
        • currents api
        • currents upload
        • currents cache
        • currents convert
      • Data Format Reference
    • Integrations
      • GitHub
        • GitHub App
        • GitHub OAuth
      • GitLab
      • Slack
      • Microsoft Teams
      • HTTP Webhooks
      • Bitbucket
    • API
      • Introduction
      • Authentication
      • API Keys
      • Errors
      • Pagination
      • API Resources
        • Instances
        • Runs
        • Projects
        • Spec Files
        • Test Signature
        • Test Results
    • Data Privacy
      • Access to Customer Data
      • Data Retention
      • Cloud Endpoints
    • Support
Powered by GitBook
On this page
  • Get Run details
  • Cancel a Run
  • Deleting a Run

Was this helpful?

  1. Resources
  2. API
  3. API Resources

Runs

API Reference - Runs resource

This is an object representing Playwright tests run. You can retrieve a run's details and cancel a run.

  • See Projects API resource to list runs associated with a project.

  • See InstancesAPI resource for fetching Instance object by an instanceId

Asset URLs listed in the responses (videos, screenshots) are "signed" URLs. They are only valid for 2h since their retrieval.

Get Run details

GET v1/runs/:runId

Path Parameters

Name
Type
Description

runId*

String

Run ID

Note: The output may vary between Cypress and Playwright runs.

{
    "status": "OK",
    "data": {
        "runId": "0a91f41ed60abfab9ea509e866ba9d6d", // run id
        "projectId": "bAYZ4a", // associated project Id
        "completionState": "COMPLETE", // "CANCELED" | "COMPLETE" | "IN_PROGRESS" | "TIMEOUT"
        "status": "FAILED", // "FAILED" | "FAILING" | "PASSED" | "RUNNING"
        "createdAt": "2022-07-06T08:23:40.939Z", // run creation time
        "tags": ["tagA", "tagB"], // run tags
        "cypressVersion": "9.5.4", // cypress runner version
        // timeout details
        "timeout": { 
            "isTimeout": true, // whether the run timed out
            "timeoutValueMs": 3600000 // value used for timeout
        },
        // Groups progress within the run
        "groups": [
            {
                "groupId": "regression-c64c5c2b976aa5047507cb8badc889aac7539a3b-2621389820-1",
                // Platform details for the run
                "platform": {
                    "osName": "linux",
                    "osVersion": "Debian - 10.11",
                    "browserName": "Chrome",
                    "browserVersion": "97.0.4692.71"
                },
                // Instances / specs progress
                "instances": {
                    "overall": 73,
                    "claimed": 73,
                    "complete": 73,
                    "passes": 62,
                    "failures": 11
                },
                // Tests progress
                "tests": {
                    "overall": 264,
                    "passes": 230,
                    "failures": 16,
                    "pending": 12,
                    "skipped": 6,
                    "retries": 3,
                    "flaky": 3
                }
            }
        ],
        "meta": {
            // CI Build ID associated with the run
            "ciBuildId": "regression-c64c5c2b976aa5047507cb8badc889aac7539a3b-2621389820-1",
            // Git commit info
            "commit": {
                "sha": "c64c5c2b976aa5047507cb8badc889aac7539a3b",
                "branch": "feat/branch",
                "authorName": "John Doe",
                "authorEmail": "john@users.noreply.github.com",
                "message": "Commit message",
                "remoteOrigin": "https://github.com/nasa/monorepo",
                "defaultBranch": null
            }
        },
        // Spec files associated with the run
        "specs": [
            {
                // Spec groupId
                "groupId": "regression-c64c5c2b976aa5047507cb8badc889aac7539a3b-2621389820-1",
                // Spec file path
                "spec": "integration/api/external-api-call-tests.ts",
                // Associated instance ID
                "instanceId": "b5f95e95-726f-4a3b-9edc-6cc0b0eb85fd",
                // Time when a cypress runner requested the spec file
                "claimedAt": "2022-07-06T08:37:58.317Z",
                // Time when a cypress runner reported the results to the dashboard
                "completedAt": "2022-07-06T08:38:05.113Z",
                // Cypress runner that requested the spec file 
                "machineId": "327043fb-f9df-4611-9a5e-8a33bbba7247",
                // The results of the instance associated with the spec file
                "results": {
                    // Signed video URL 
                    "videoUrl": "https://fs-staging.currents.dev/629849461deb0ae7090f97d1/bf89e79f-af2a-43cb-afba-2575e567f103.mp4?Expires=1657219165&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=QYVMeagJ~N~~3YHdSzpRZeCevUolGmUkG5Wr45D3V5ucLdqNnIulSRPoqLMFppKYU9e1AqOXz-7AmCZ-796~17t4RHVfURSdl3Fb4D~ksZ6IcVO6xrnkV8dfJEwZmBcQS8423BqXJ2Xs1VL~XLy~2UOwo4HYEHL5BxgEVtT0HgfUOW5xqopV9MHblDn7Ll0VbCnCJlc5oRjUNXwYjlxkTwe9hKMzaM~5nt82C2O3loMJuc2j0ma2UEPsMSC6zxhI4fhkhD2P-vQ0-Vd2iRLYe6FZnoQ73UIeOkucjGSPnaGTBFi~PoxTZ9ZDMkiCEYfCusYi7HtVM3-~Istbg~JJMw__",
                    // Aggregated test results for the instance
                    "stats": {
                        "suites": 1,
                        "tests": 2,
                        "passes": 0,
                        "pending": 1,
                        "skipped": 0,
                        "failures": 1,
                        "wallClockStartedAt": "2022-07-06T07:25:50.856Z",
                        "wallClockEndedAt": "2022-07-06T07:25:50.992Z",
                        "wallClockDuration": 136
                    },
                    // Screeenshots associated with the instance
                    "screenshots": [
                        {
                            "screenshotId": "wz9n2",
                            "name": null,
                            "testId": "r3",
                            "testAttemptIndex": 0,
                            "takenAt": "2022-07-06T07:25:50.893Z",
                            "height": 720,
                            "width": 1280,
                            "screenshotURL": "https://fs-staging.currents.dev/629849461deb0ae7090f97d1/50d92085-1493-4483-9cfa-07040876d083.png?Expires=1657219165&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=HGGQhays0F~nZriOkuUboDQLI67XEyczK8KdVQLjIAVWwfpPSQMe7YA370QP6t7Xg~PviOlFkBLETtVkG1jI3L2FYojOtnyaDYhcpfqG~0z5rQGw9ScRIm8lq8QYaoI8bBFr6cOmji8Zv3~fcjBEHqpFbkC8tmQMJI~QZC~DbgXcS7ta3qwydMUmEu6RGEWnPuz8CGYC1gh3hnYqgsV7GakR~qWzymqJWBZHM~ZW3R9AbHai4T3Makv4OTMVvXXHl9nZdi6CKev4pfklf2O2w5xju1V4y9FVRpgu7FUz4US7atnSJuqteWiZBse8hpG2mDOVetjUiebiBLNIWx12Kw__"
                        }
                    ],
                    // The amount of flaky tests detected in the instance
                    "flaky": 0
                }
            }
        ]
    }
}
{
    "status": "OK",
    "data": {
        "runId": "477f534243d9051c", // run id
        "projectId": "DgTfZV", // associated project Id
        "createdAt": "2024-05-27T12:30:15.171Z", // run creation time
        "tags": ["project:chrome"], // run tags
        "durationMs": 234435, // run duration in ms
        // timeout details
        "timeout": {
            "isTimeout": false  // whether the run timed out
        },
        // Group progress within the run
        "groups": [
            {
                // Instances / specs progress
                "instances": {
                    "overall": 1,
                    "claimed": 1,
                    "complete": 1,
                    "passes": 0,
                    "failures": 1
                },
                // Tests progress
                "tests": {
                    "overall": 5,
                    "tests": 5,
                    "passes": 0,
                    "failures": 5,
                    "pending": 0,
                    "skipped": 0,
                    "flaky": 0,
                    "retries": 0
                },
                "groupId": "chromium",
                // Platform details for the group
                "platform": {
                    "osName": "linux",
                    "osVersion": "Ubuntu - 22.04",
                    "browserName": "chromium",
                    "browserVersion": ""
                },
                // Group tags
                "tags": ["project:chrome"]
            }
        ],
        "meta": {
            // CI Build ID associated with the run
            "ciBuildId": "1716813012",
            // Git commit info
            "commit": {
                "sha": "c64c5c2b976aa5047507cb8badc889aac7539a3b",
                "branch": "feat/branch",
                "authorName": "John Doe",
                "authorEmail": "john@users.noreply.github.com",
                "message": "Commit message",
                "remoteOrigin": "https://github.com/nasa/monorepo",
                "defaultBranch": null
            },
            // Framework details
            "framework": {
                "type": "pw" | "cypress" | "jest" | "postman" | "vitest",
                "version": "1.52.0", // test runner version
                "clientVersion": "1.12.0" // currents client version
            }
        },
        // Spec files associated with the run
        "specs": [
            {
                // Spec file path
                "spec": "test-a.spec.ts",
                // Spec groupId
                "groupId": "chromium",
                // Associated instance ID
                "instanceId": "IzzYS81rn8unznmX",
                // Time when a playwright runner claimed the spec file
                "claimedAt": "2024-05-27T12:30:14.331Z",
                // Time when a playwright runner reported the results to the dashboard
                "completedAt": "2024-05-27T12:30:28.275Z",
                // Tags associated with the spec file
                "tags": ["project:chrome"],
                // The results of the instance associated with the spec file
                "results": {
                    "flaky": 0,
                    "stats": {
                        "overall": 5,
                        "tests": 5,
                        "passes": 0,
                        "failures": 5,
                        "pending": 0,
                        "skipped": 0,
                        "flaky": 0,
                        "retries": 0,
                        "wallClockStartedAt": "2024-05-27T12:30:14.331Z",
                        "wallClockEndedAt": "2024-05-27T12:30:28.275Z",
                        "wallClockDuration": 13944
                    },
                    // Note: videos are available only via instance API
                    "videoUrl": null,
                    // Note: screenshots are available only via instance API
                    "screenshots": []
                },
                // Playwright runner that requested the spec file 
                "machineId": "lcI9xbSwemNV",
                // Playwright worker information
                "worker": {
                    "workerIndex": 0,
                    "parallelIndex": 0
                }
            }
        ],
        "completionState": "COMPLETE", // "CANCELED" | "COMPLETE" | "IN_PROGRESS" | "TIMEOUT"
        "status": "FAILED" // "FAILED" | "FAILING" | "PASSED" | "RUNNING"
    }
}

Cancel a Run

PUT v1/runs/:runId/cancel

Path Parameters

Name
Type
Description

runId*

String

Run ID

{
    "status": "OK",
    "data": {
        "actor": "api:keyName", // api key name used to cancel the run
        "canceledAt": "2022-07-07T07:22:13.611Z", // cancellation time
        "reason": "apiRequest", // cancellation reason
        "runId": "9ee42e4b85c02c634fe30b26d728624e" // associated runId
    }
}
{
    "status": "FAILED",
    "error": "Run already cancelled"
}

Deleting a Run

DELETE v1/runs/:runId

Path Parameters

Name
Type
Description

runId*

String

Run ID

{
    "status": "OK",
    "data": {
        "runId": ":runId",
        "actor": "API Request"
    }
}
PreviousInstancesNextProjects

Last updated 1 month ago

Was this helpful?