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
      • Canceling 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

Spec Files

API Reference - Spec Files resource

This resource represents the spec files and their performance metrics, computed based on the recorded results.

Querying this resource will fetch all the executions recorded between date_start, date_end with all the filters applied, group the results by spec file name and calculate metrics:

  • overallExecutions - overall executions included in the aggregation.

  • avgDuration - an average value of the durations for non-failed executions, measured in seconds; set includeFailedInDuration to true to include failed executions in the calculation

  • failedExecutions - count of executions with at least 1 failed test.

  • flakyExecutions - count of executions with at least 1 flaky test.

  • timeoutExecutions - count of executions that were marked as timed out.

  • fullyReported - count of executions that were fully reported - i.e. all the known tests fully completed and reported the results

  • suiteSize - maximum number of tests across all the included executions

  • failureRate - the ratio of failedExecutions / overallExecutions

  • timeoutRate - the ratio of timeoutExecutions / overallExecutions

  • flakeRate - the ratio of flakyExecutions / overallExecutions

The results will be sorted according to the order parameter. Using this query would allow to programmatically access the data that is available in Test Suite Explorer.

This resource uses Offset Pagination as documented at Pagination

List the spec files associated to your specific organization and project

GET v1/spec-files/:projectId

Path Parameters

Name
Type
Description

projectId*

String

Your project ID

Query Parameters

Name
Type
Description

limit

Number

Pagination limit 1-50. Default: 50

page

Number

date_start*

ISOString

Date start - the test results included within the date range will be included.

date_end*

ISOString

Date end - the test results included within the date range will be included.

tags[]

String[]

List of tags for filtering the included test results. To provide multiple values, use tags[]=valueA&tags[]=valueB

authors[]

String[]

List of authors for filtering the included test results. To provide multiple values, use authors[]=valueA&authors[]=valueB

branches[]

String[]

List of branches for filtering the included test results. To provide multiple values, use branches[]=valueA&branches[]=valueB

includeFailedInDuration

Boolean

Include failed spec files in duration calculation. Default: false.

order

Enum

Defines the attribute to order the spec files list. Default: avgDuration.

Valid values: avgDuration, failedExecutions, failureRate, flakeRate, flakyExecutions, fullyReported, overallExecutions, suiteSize, timeoutExecutions, timeoutRate

specNameFilter

String

A string that is included in the spec file name. Default: empty.

dir

Enum

The direction of the spec files list sorting. Default: desc.

Options: asc, desc.

{
    "status": "OK",
    "data": {
        "list": [
            {
                "signature": "326aafb71c1fda3085ebde3671f230f0",
                "spec": "feature.onboarding-25.spec.ts",
                "metrics": {
                    "overallExecutions": 3,
                    "avgDuration": 13184,
                    "failedExecutions": 0,
                    "flakyExecutions": 0,
                    "timeoutExecutions": 0,
                    "suiteSize": 2,
                    "failureRate": 0,
                    "timeoutRate": 0,
                    "flakeRate": 0,
                    "fullyReported": 3
                }
            }
        ],
        "total": 44, // the total number of spec files detected
        "nextPage": number | false // offset pagination hint
    }
}
{
    "status": "FAILED",
    "error": "\"date_start\" is mandatory"
}
{
    "status": "FAILED",
    "error": "Not found"
}

PreviousProjectsNextTest Signature

Last updated 1 month ago

Was this helpful?

Page 0+. Default: 0. See

Pagination