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
        • Tests Performance
      • Spec Files Explorer
        • Spec Files Performance
      • Errors Explorer
  • 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

Was this helpful?

  1. Resources
  2. API
  3. API Resources

Instances

API Reference - Instance resource

An instance is an object representing the results of a Playwright spec file.

You can obtain the list of instance objects by querying Runs API resource.

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

Get Instance item

GET v1/instances/:instanceId

Path Parameters

Name
Type
Description

instanceId*

String

Instance ID

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

{
    "status": "OK",
    "data": {
        // Associated run id
        "runId": "9ee42e4b85c02c634fe30b26d728624e",
        // Associated group id
        "groupId": "1657092333",
        // Associated project id
        "projectId": "LPjo81",
        // instance id
        "instanceId": "bf89e79f-af2a-43cb-afba-2575e567f103",
        // spec file path
        "spec": "cypress/integration/orchestration_100.spec.js",
        // cypress runner version used to create the instance
        "cypressVersion": "10.3.0",
        // cypress runner id used to create the instance
        "machineId": "25574b7e-c7d0-4ea4-804a-c56304c03fe0",
        // Git Commit info
        "commit": {
            "remoteOrigin": "https://github.com/nasa/monorepo",
            "branch": "feat/branch",
            "authorName": "John Doe",
            "authorEmail": "john@doe.org",
            "message": "Commit message\n",
            "sha": "d45ffe35ac5af2ea98726503f2dade3cf821a32e"
        },
        // Tags used to create the associated run
        "tags": ["tagA"],
        // Platform used to execute the spec file
        "platform": {
            "osName": "darwin",
            "osVersion": "21.4.0",
            "browserName": "Electron",
            "browserVersion": "100.0.4896.160"
        },
        // Instance creation time
        "createdAt": "2022-07-06T07:25:50.025Z",
        // Test results
        "results": {
            "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
            },
            // Tests details
            "tests": [
                {
                    // The body of the test
                    "body": "() => {\n    throw new Error(\"oh!\");\n    cy.log(\"Apple\");\n  }",
                    // Test Title 
                    "title": [
                        "Test",
                        "passing test"
                    ],
                    // Test State
                    "state": "failed",
                    // Outcome of a failed test
                    "displayError": "Error: oh!\n    at Context.eval (https://en.wikipedia.org/__cypress/tests?p=cypress/integration/orchestration_100.spec.js:101:11)",
                    // Test attempts details
                    "attempts": [
                        {
                            "state": "failed",
                            "error": {
                                "name": "Error",
                                "message": "oh!",
                                "stack": "    at Context.eval (https://en.wikipedia.org/__cypress/tests?p=cypress/integration/orchestration_100.spec.js:101:11)",
                                "codeFrame": {
                                    "line": 3,
                                    "column": 11,
                                    "originalFile": "cypress/integration/orchestration_100.spec.js",
                                    "relativeFile": "cypress/integration/orchestration_100.spec.js",
                                    "absoluteFile": "/Users/agoldis/currents-demo/cypress/integration/orchestration_100.spec.js",
                                    "frame": "  1 | describe(\"Test\", function () {\n  2 |   it(\"passing test\", () => {\n> 3 |     throw new Error(\"oh!\");\n    |           ^\n  4 |     cy.log(\"Apple\");\n  5 |   });\n  6 |   it.skip(\"ignored / pending tests\", () => {",
                                    "language": "js"
                                }
                            },
                            "wallClockStartedAt": "2022-07-06T07:25:50.876Z",
                            "wallClockDuration": 102,
                            "videoTimestamp": 827
                        }
                    ],
                    "testId": "r3"
                },
                {
                    "body": "",
                    "title": [
                        "Test",
                        "ignored / pending tests"
                    ],
                    "state": "pending",
                    "displayError": null,
                    "attempts": [
                        {
                            "state": "pending",
                            "error": null,
                            "wallClockStartedAt": null,
                            "wallClockDuration": null,
                            "videoTimestamp": null
                        }
                    ],
                    "testId": "r4"
                }
            ],
            // An exception that prevented the spec file from running
            "exception": null,
            // Screenshot details
            "screenshots": [
                {
                    "screenshotId": "wz9n2",
                    "name": null,
                    // Associated testId
                    "testId": "r3",
                    "testAttemptIndex": 0,
                    "takenAt": "2022-07-06T07:25:50.893Z",
                    "height": 720,
                    "width": 1280,
                    // Screenshot URL
                    "screenshotURL": "https://fs-staging.currents.dev/629849461deb0ae7090f97d1/50d92085-1493-4483-9cfa-07040876d083.png?Expires=1657182482&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=RXyy7IzX0v793GiFko41roeT8veZ0Oe63prKdEB4k2WiXbJsNGhM-ee11L8d7t9-5vYPngoOXa6CGjl7P0~iFcDOxdc3XSjLYmv3mopvpWcqFdBi06RmU54NPf3jWCStQ9A0-WoR9uSp6PkhAzwJHknyx6epQXH2iwSuWJ-ROvalqPpshTjndT9R35-DnEefNaXnmZEzm-oScWCjtC~YzJlW4y3rLTaJIFfnR-K-ZCBMBy3lFn7fd~-YVUTo~RkoWN3uM-FpK-bZBjkfBv9DhRR1Q96bBbtZ3v7kcbohI2FrqoxcYEgePWqVXusvCWUIY7LybMOYi7TXyhNFkXZxlg__"
                }
            ],
            // Video URL
            "videoUrl": "https://fs-staging.currents.dev/629849461deb0ae7090f97d1/bf89e79f-af2a-43cb-afba-2575e567f103.mp4?Expires=1657182482&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=KOu78qUJ-3ZwLlXXebh6InH8ItbhNp2KS3RrsDqfXHV7R-4vDBqK1qCCcGc6VEeCq~5yLIoupoXKdhnhrsNvFgKKaOu122bCJTDJnIK8WmdsypftPekvI~Q6XXqhx2~DhYU1u~gU4DKqYNhAGvk6ZqZdW3YE6Tg17wv4GU2yLl1uOrnZtXL5AJATrREuSV86wFto94wjLU6QGpOIGCB-TMDp3MHbKsVg16JqgeCapYIvys115BfvQHvqCE4CtI0FvtxnmkO9URaN35N7rV2~azDxHPzpSISUkh3fduwBd-ZO50ZB0dHa9tgGNrpVWk42EPUY~iBrnvttC8cob4j3Yw__",
        }
    }
}
{
    "status": "OK",
    "data": {
        // Associated project id
        "projectId": "DgTfZV",
        // Associated run id
        "runId": "dbb95157b6cb92f0",
        // Associated group id
        "groupId": "chromium",
        // instance id
        "instanceId": "2tniK8lM9j1rSoVh",
        // Playwright runner id used to create the instance
        "machineId": "CnZYMAcVDvd5",
        // spec file path
        "spec": "test-a.spec.ts",
        // Instance creation time
        "createdAt": "2024-06-17T09:49:31.368Z",
        // Playwright worker information
        "worker": {
            "workerIndex": 1,
            "parallelIndex": 1
        },
        // Framework information
        "framework": {
            "clientVersion": "1.4.0",
            "type": "pw",
            "version": "1.44.0"
        },
        // Platform used to execute the spec file
        "platform": {
            "osName": "linux",
            "osVersion": "Ubuntu - 22.04",
            "browserName": "chromium",
            "browserVersion": ""
        },
        // Tags used to create the associated run
        "tags": ["project:chrome"],
        "commit": {
            "remoteOrigin": "https://github.com/nasa/monorepo",
            "branch": "feat/branch",
            "authorName": "John Doe",
            "authorEmail": "john@doe.org",
            "message": "Commit message\n",
            "sha": "d45ffe35ac5af2ea98726503f2dade3cf821a32e"
        },
        "claimList": [
            {
                "machineId": "CnZYMAcVDvd5",
                "t": 1718617771368
            }
        ],
        // Instance signature
        "signature": "754165b1b268e4b6f8d967ac1548bdd0",
        // Test results
        "results": {
            "stats": {
                "overall": 1,
                "tests": 1,
                "passes": 0,
                "failures": 1,
                "pending": 0,
                "skipped": 0,
                "flaky": 0,
                "retries": 0,
                "wallClockStartedAt": "2024-06-17T09:49:31.370Z",
                "wallClockEndedAt": "2024-06-17T09:49:46.426Z",
                "wallClockDuration": 15056
            },
            // Tests details
            "tests": [
                {
                    // Indicates if the test is done
                    "_d": true,
                    // Test state
                    "state": "failed",
                    "testId": "9d314e60d70d532f877a-b29c77ddb916da38bad5",
                    // Test title
                    "originalTitle": ["test 01"],
                    // Test title without tags
                    "title": ["test 01"],
                    // Test attempts details
                    "attempts": [
                        {
                            "_d": true,
                            "attemptId": "EgFANdSInxFkVNat-0",
                            "state": "failed",
                            "rawStatus": "failed",
                            "workerIndex": 0,
                            "parallelIndex": 0,
                            "error": {
                                "name": "Error",
                                "message": "oh!",
                                "stack": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 1\n    at /home/slavic/Projects/currents-playwright/e2e/artifacts/test-a.spec.ts:34:13",
                                "codeFrame": {
                                    "frame": "  32 | test(\"test 01\", async ({ page }, testInfo) => {\n  33 |   await testBody({ page }, testInfo);\n> 34 |   expect(1).toBe(2);\n     |             ^\n  35 | });\n  36 |\n  37 | test(\"test 02\", async ({ page }, testInfo) => {",
                                    "line": 34,
                                    "column": 13,
                                    "file": "/home/slavic/Projects/currents-playwright/e2e/artifacts/test-a.spec.ts"
                                }
                            },
                            "wallClockStartedAt": "2024-06-17T09:49:31.370Z",
                            "wallClockDuration": 15445,
                            "videoTimestamp": null
                        }
                    ],
                    "displayError": null,
                    "isFlaky": false,
                    "tags": ["project:chrome"]
                }
            ],
            // Test traces
            "playwrightTraces": [
                {
                    "testId": "9d314e60d70d532f877a-3cf4d85bf8993ae9b67d",
                    "traceId": "dec2d21867282cb99b9d850e2145e8ed",
                    "testAttemptIndex": 0,
                    "name": "trace",
                    "traceURL": "https://fs-staging.currents.dev/64c37267d04f264d0923d328/9I2Njx6U5sOa0gx9.zip?Expires=1718877913&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=CKuitZE2XIb9tkf-pb435dsSx1fBUb3hgJ0qt2RxrD0qNSF0gviXZMQuaWCoPDaE7MWQbH4G71EelUnOim6tA0HokMDsN-lUHYd44pCVBEAOG92vyFF-WBnagVBS1lSySin059qex1ZqeBoLRzNTGmz-h5LlpaC4oi3GAJEWAVcv4wWFFPxaidrNNGe73sPaAh18wD9fpiJntRMDo6S-FAJY8vbmbWLic9jMvWALUwqvgtiAUbh5wPA3NCaFbhbpykTOECxgwoOPs0lyctkiXP-H~m0L~GhpHcc93Th0HJjbfAy817aVgnGoP9Hxg23R3Z~pEOsk1qKuAuyMyJnHxA__"
                }
            ],
            // Test screenshots
            "screenshots": [
                {
                    "name": "manually generated screenshot",
                    "testId": "9d314e60d70d532f877a-49357ab40cb4d4de5da1",
                    "screenshotId": "d9ed1360c77b7e7bc441fee1c91acc03",
                    "testAttemptIndex": 0,
                    "screenshotURL": "https://fs-staging.currents.dev/64c37267d04f264d0923d328/s00TiZbe3RVgv3jO.png?Expires=1718877913&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=RTE3yO~FAsCUGnYwF64FRmDWpLIiiGnyxhOL7HltoMrED7fznKXe9arrDsfY3ZsqGf3Vz1mQ9DADd55ltlMS4a-CpZ0Vyk51OokzutsfjFVCes18vNkOu3rUE4fw-lmpv664HOT4laFYfq1sBjgiHn330jbfd8WC1SuC32eKz699qWyHq83jesfapkFFTSS1DCeDZd-Zju74TlEGnrOsk2kpkf2wSFaYJJY0GcGXP9hzTc~fgt1Q-pX8mMdcoxRswStvj5g9tl4ZLvGrNNK2li7YEiFRWee~xcu6JED3I-pPVoGzbZQiVpqHY1S3Bw2DvEdnPVI2BDXs~3HffpQTBA__",
                    "takenAt": "2024-06-17T09:49:40.961Z"
                }
            ],
            // Test videos
            "videos": [
                {
                    "testId": "9d314e60d70d532f877a-3cf4d85bf8993ae9b67d",
                    "videoUrl": "https://fs-staging.currents.dev/64c37267d04f264d0923d328/zTDmXmfu4kxMe088.webm?Expires=1718877913&Key-Pair-Id=K1ZNDCCIZ3P4FU&Signature=tVi3k4VJVkCRPzY7Nz-rMxlUfuDvRL3sJi9ybwupZgy4BW6c7usH8fEJJrjJ5z~h1Y-mEsuO6APpSMvQcxqMYgRvv1RO5S6pQoGLjceBbvRPaagsskMDyj5tA2E96GvHDkTqmNFTxRk~Mt-Nj-he-tob~VdebKn4wNpu8jAB-6T6Vy1NUKEQLxifvVbLpSXNv4uWFzn3jMTIfpYeblpOMAG-NdZomNEWErgBbqn9LheRxosIsQ4ZSZIZP0YLTw-bTynF01B0Lk-y0jXMqxzem2G048BXHsUjpGWzciBCcco-6Z967bFCT3XZdloNxfZevN1gM0wxN-DjesaLbmw5-g__",
                    "testAttemptIndex": 0
                }
            ]
        },
        // Instance last update time
        "_t": "2024-06-17T09:49:57.380Z"
    }
}
PreviousAPI ResourcesNextRuns

Last updated 10 months ago

Was this helpful?