### Dynamic Documentation Query Example Source: https://docs.currents.dev/dashboard/runs/cancel-run This example demonstrates how to query the Currents.dev documentation dynamically for additional information not explicitly present on the page. It uses a GET request with an 'ask' query parameter. ```http GET https://docs.currents.dev/dashboard/runs/cancel-run.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.currents.dev/guides/ci-optimization/ci-tests-on-spot-instances Use this GET request to ask specific questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://docs.currents.dev/guides/ci-optimization/ci-tests-on-spot-instances.md?ask= ``` -------------------------------- ### HTTP GET Request Example for Querying Documentation Source: https://docs.currents.dev/getting-started/ci-setup/github-actions/re-run-failed-only-tests/custom-ci-build-id-for-reruns Demonstrates how to query documentation dynamically by appending an 'ask' query parameter to the page URL with a natural language question. ```http GET https://docs.currents.dev/getting-started/ci-setup/github-actions/re-run-failed-only-tests/custom-ci-build-id-for-reruns.md?ask= ``` -------------------------------- ### Example HTTP POST Request for Run Start Event Source: https://docs.currents.dev/resources/integrations/http-webhooks Demonstrates how to send an HTTP POST request to a webhook endpoint with data for a Cypress test run start event. Includes sample payload with event details, run URL, build ID, commit information, and test statistics. ```bash curl --location --request POST 'https://yourserver.com/webhook/currents.dev' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "event": "RUN_START", \ "runUrl": "https://app.currents.dev/run/950a13c3edf4f28b6e8ce301a404b4aa", \ "buildId": "demo-build-cdx3314", \ "commit": { \ "authorEmail": "john@doe.com", \ "authorName": "John Doe", \ "defaultBranch": "main", \ "branch": "feature-A", \ "message": "feat: change button color", \ "remoteOrigin": "https://github.com/org/repo.git", \ "sha": "5a7edc9a156e417068060d67109021351fc7d9b8" \ }, \ "failures": 0, \ "flaky": 0, \ "overall": 1, \ "passes": 1, \ "pending": 0, \ "retries": 0, \ "skipped": 0 \ }' ``` -------------------------------- ### Playwright Configuration for Currents Source: https://docs.currents.dev/getting-started/your-first-playwright-run This prompt outlines the steps to integrate Currents with Playwright, including package installation, configuration updates, and reporter setup. ```bash npm i -D @currents/playwright ``` -------------------------------- ### Install Alternative Cypress Binaries with Environment Variable Source: https://docs.currents.dev/getting-started/other-frameworks/cypress/integrating-with-cypress/alternative-cypress-binaries Use this command to install Cypress binaries from an alternative mirror using a single command. This is useful for ensuring consistent installations. ```bash CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force ``` -------------------------------- ### Query Support Documentation via HTTP GET Source: https://docs.currents.dev/resources/support Perform an HTTP GET request to query the support documentation dynamically. Include your question as the 'ask' query parameter. ```http GET https://docs.currents.dev/resources/support.md?ask= ``` -------------------------------- ### Install and Run Cypress with Currents CLI Source: https://docs.currents.dev/resources/reporters/currents-cli Install both @currents/cli and cypress, then use 'npx currents run' for recording and parallel execution. This is typically used in CI environments. ```bash npm install @currents/cli cypress npx currents run --record --parallel --key $CURRENTS_RECORD_KEY ``` -------------------------------- ### Install Fresh Cypress Binaries Source: https://docs.currents.dev/resources/reporters/currents-cli After removing Currents, run this command to install a fresh version of Cypress binaries. ```bash cypress install --force ``` -------------------------------- ### Example Orchestration Output Source: https://docs.currents.dev/guides/ci-optimization/playwright-orchestration This is an example of the output you might see when a successfully created orchestration session is running. It includes details about the build, project, and test execution. ```bash $ npx pwc-p run --key *secret* --project-id WeZwSj --ci-build-id example-001 🚀 Starting orchestration session... đŸ“Ļ Currents reporter: 2.0.0 - ci build id: example-001 - project id: WeZwSj - orchestration id: 11b601f500893bacfa169acb126b6239 - machine id: bA0qyMOxUiCz9XT0 🎭 Playwright: 1.60.0 5 tests in 1 project [chromium] 🌐 Executing orchestrated task: [chromium] test2.spec.ts, test.spec.ts â„šī¸ Batch size: 3 🌐 Run URL: https://app.currents.dev/run/4aefcb5cd3bb5c89 #... ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.currents.dev/getting-started/ci-setup/github-actions/named-runners Perform an HTTP GET request on the current page URL with the `ask` query parameter to get dynamic answers and relevant excerpts from the documentation. ```http GET https://docs.currents.dev/getting-started/ci-setup/github-actions/named-runners.md?ask= ``` -------------------------------- ### Install @currents/nx and Cypress Source: https://docs.currents.dev/getting-started/other-frameworks/cypress/ci-setup/cypress-nx Install the necessary npm packages for @currents/nx, cypress-cloud, and Cypress itself. ```sh npm i --save-dev @currents/nx cypress-cloud # install cypress if needed npm i --save-dev cypress ``` -------------------------------- ### Install Node Test Reporter and CLI Source: https://docs.currents.dev/resources/reporters/currents-node-test-reporter Install the necessary packages for the Node.js test reporter and the Currents command-line interface as development dependencies. ```bash npm install @currents/node-test-reporter @currents/cmd --save-dev ``` -------------------------------- ### Install Cypress and Cypress Cloud Source: https://docs.currents.dev/getting-started/other-frameworks/cypress/you-first-cypress-run Installs the necessary npm packages for Cypress and the Cypress Cloud integration. ```bash npm install cypress cypress-cloud ``` -------------------------------- ### Install Compatible cypress-cloud Package Source: https://docs.currents.dev/resources/reporters/cypress-cloud/migration-to-cypress-13 Install the beta version of cypress-cloud that is compatible with Cypress 13. This is a prerequisite for using Cypress 13 with the cypress-cloud reporter. ```bash npm i cypress-cloud@beta ``` -------------------------------- ### Full GitHub Actions Workflow Example Source: https://docs.currents.dev/getting-started/ci-setup/github-actions/re-run-failed-only-tests/re-run-failed-only-tests-sharded This is a complete GitHub Actions workflow demonstrating how to set up sharded Playwright tests with the 'Playwright Last Failed' action to rerun only failed tests. It includes dependency installation, Playwright setup, and test execution with reruns. ```yaml name: failed-only-reruns on: push: jobs: test-reporter: strategy: fail-fast: false matrix: shard: [1, 2, 3] timeout-minutes: 60 runs-on: ubuntu-latest container: space.vars.PW_IMAGE_ROUTE + ":" + space.vars.LATEST_PW_IMAGE_VERSION env: CURRENTS_PROJECT_ID: ${{ vars.CURRENTS_PROJECT_ID }} CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }} CURRENTS_CI_BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }} steps: - uses: actions/checkout@v4 with: ref: ${{ github.ref }} - run: | echo "$GITHUB_WORKSPACE" git config --global --add safe.directory "$GITHUB_WORKSPACE" - uses: actions/setup-node@v4 with: node-version: "24.x" - name: Install dependencies run: | npm ci npx playwright install chrome - name: Playwright Last Failed action id: last-failed-action uses: currents-dev/playwright-last-failed@v2 with: pw-output-dir: basic/test-results matrix-index: ${{ matrix.shard }} matrix-total: ${{ strategy.job-total }} - name: Playwright Tests working-directory: ./basic run: | COMMAND="npx playwright test --config playwright.config.reporter.ts ${{ steps.last-failed-action.outputs.extra-pw-flags }}" echo "Running command: $COMMAND" $COMMAND ``` -------------------------------- ### Discovery Output Example Source: https://docs.currents.dev/guides/ci-optimization/playwright-orchestration Example commands demonstrating how to create a discovery file with filters and then use it to run orchestrated tests. The discovery file can also be provided via environment variables or configuration. ```bash npx pwc-p discover --pwc-discovery-file tests.txt --grep @smoke --project frontend npx pwc-p run --pwc-discovery-file tests.txt ... ``` -------------------------------- ### Timeout Error Example Source: https://docs.currents.dev/dashboard/test-suite-performance-explorer/errors-explorer This example illustrates a general test timeout error, indicating that the test exceeded its maximum allowed duration. This can point to infrastructure delays or setup issues. ```text Test timeout of 30000ms exceeded ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.currents.dev/guides/currents-actions/affected-tests Use this method to ask specific questions about the documentation. The response includes a direct answer and relevant sources. ```bash GET https://docs.currents.dev/guides/currents-actions/affected-tests.md?ask= ``` -------------------------------- ### Infra / Misc Error Example Source: https://docs.currents.dev/dashboard/test-suite-performance-explorer/errors-explorer This example shows an Infra/Misc error, which is unrelated to test logic and typically caused by environment or runtime misconfigurations. It's useful for debugging setup and dependency problems. ```text Error: browserType.launch: Executable doesn't exist at ... ``` -------------------------------- ### Complete GitHub Actions Workflow with Named Runners Source: https://docs.currents.dev/getting-started/ci-setup/github-actions/named-runners A full example of a GitHub Actions workflow file demonstrating the setup for named runners and Playwright tests. ```yaml name: Playwright Tests on: push: branches: [main, master] pull_request: branches: [main, master] jobs: playwright-tests: timeout-minutes: 60 runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - runner_name: "Runner 1" shard: 1/2 - runner_name: "Runner 2" shard: 2/2 steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: "24.x" - name: Install Playwright browsers run: npx playwright install --with-deps - name: Install dependencies run: npm install - name: Run Playwright tests env: CURRENTS_MACHINE_ID: ${{ matrix.runner_name }} run: npx pwc --key ${{secrets.CURRENTS_RECORD_KEY}} --project-id ${{secrets.CURRENTS_PROJECT_ID}} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}} --shard ${{ matrix.shard }} ``` -------------------------------- ### Example Buildkite Pipeline Configuration Source: https://docs.currents.dev/getting-started/ci-setup/buildkite This Buildkite pipeline configuration demonstrates setting up parallel Playwright tests. It installs dependencies, installs Playwright with necessary browser dependencies, runs sharded tests, and utilizes a Docker image for the build environment. It also configures environment variables for Currents. ```yaml steps: - label: ":playwright: Playwright Tests" command: | npm ci npx playwright install --with-deps npx playwright test --shard=$((BUILDKITE_PARALLEL_JOB + 1))/$BUILDKITE_PARALLEL_JOB_COUNT parallelism: 3 plugins: - docker#v5.11.0: image: "space.vars.PW_IMAGE_ROUTE + ":" + space.vars.LATEST_PW_IMAGE_VERSION" env: CURRENTS_PROJECT_ID: "bnsqNa" CURRENTS_RECORD_KEY: "${CURRENTS_RECORD_KEY}" ``` -------------------------------- ### Agent Instructions for Querying Documentation Source: https://docs.currents.dev/getting-started/other-frameworks/cypress/ci-setup/cypress-azure-devops This section explains how to dynamically query the documentation using an HTTP GET request with an 'ask' query parameter. It provides the URL format and guidance on formulating specific, self-contained questions. ```http GET https://docs.currents.dev/getting-started/other-frameworks/cypress/ci-setup/cypress-azure-devops.md?ask= ``` -------------------------------- ### Full GitLab CI Job Example for Re-running Failed Tests Source: https://docs.currents.dev/getting-started/ci-setup/gitlab/re-run-failed-only-tests This is a complete GitLab CI job configuration that includes steps for installing dependencies, downloading the cache, installing Playwright, setting a build ID, and running tests with re-run capabilities. It also includes the `after_script` to upload the cache. ```yaml test-rerun-reporter: image: space.vars.PW_IMAGE_ROUTE + ":" + space.vars.LATEST_PW_IMAGE_VERSION stage: test parallel: 3 variables: CURRENTS_PROJECT_ID: ${{ vars.CURRENTS_PROJECT_ID }} # CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }} script: - npm ci # Grab the last run from cache. CacheId is automatically calculated for GitLab, and a .currents_env file is created with extra env variables # $EXTRA_PW_FLAGS will contain the correct --shard flag, as well as --last-failed if this was a retried job # $RUN_ATTEMPT will be populated with a value 1+ based on how many times this job has been retried - npx currents cache get --preset last-run --continue - cat .currents_env >> $GITLAB_ENV && source .currents_env - npx playwright install - cd ./basic # Run playwright, provide a build id with the run-attempt included and also pass $EXTRA_PW_FLAGS - export CURRENTS_CI_BUILD_ID="reporter-$CI_PIPELINE_ID-$RUN_ATTEMPT" - npx playwright test -c playwright.config.reporter.ts $EXTRA_PW_FLAGS after_script: # Save the last-run.json to cache after the run - npx currents cache set --pw-output-dir basic/test-results --preset last-run ``` -------------------------------- ### Example: Running Jest and Uploading Results Source: https://docs.currents.dev/resources/reporters/currents-jest Demonstrates running Jest with the Currents reporter and then uploading the generated results using the @currents/cmd package. ```bash $ npx jest --reporters=@currents/jest --reporters=default [currents]: Run started [currents]: Report directory is set to - /Users/agoldis/immer/.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d # .... [currents]: [__tests__/base.js] - spec results written to file: /Users/agoldis/immer/.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d/instances/Aql-q2CM.json [currents]: Run completed # 📖 see @currents/cmd documentation $ npx currents upload --key=XXX --project-id=C3lBM6 Currents config: { projectId: 'C3lBM6', recordKey: '*****', removeTitleTags: false, disableTitleTags: false, debug: false } Report directory: '.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d' [root] Run created: 'https://app.currents.dev/run/8466c149d9bbf745' Script execution finished ✨ Done in 17.96s. ``` -------------------------------- ### Use pwc-p discover and pwc-p run Commands Source: https://docs.currents.dev/guides/ci-optimization/playwright-orchestration/playwright-orchestration-migration-guide Execute `pwc-p discover` to generate a test discovery file, then use `pwc-p run` with the generated file to initiate orchestrated execution. Refer to `pwc-p run --help` for available flags. ```bash npx pwc-p discover --pwc-discovery-file discovery-path [...filters] npx pwc-p run --pwc-discovery-file discovery-path --key currents-record-key --project-id currents-project-id --ci-build-id ci-build-id ``` -------------------------------- ### Jenkinsfile for CI Setup Source: https://docs.currents.dev/getting-started/ci-setup/jenkins A Jenkinsfile defining a CI pipeline with parameters for CI Build ID and orchestration. It handles dependency installation, test execution decisions based on parameters, and integrates with Currents for last failed tests. ```groovy pipeline { agent any parameters { string(name: 'CI_BUILD_ID', defaultValue: 'none', description: 'Set this value if you want to execute only the failed tests from a specific run') booleanParam(name: 'IS_ORCHESTRATION', defaultValue: false, description: 'Set this value if you want to execute an orchestrated run') } environment { CURRENTS_PROJECT_ID = credentials('CURRENTS_PROJECT_ID') CURRENTS_RECORD_KEY = credentials('CURRENTS_RECORD_KEY') CURRENTS_CI_BUILD_ID = "reporter-${JOB_NAME}-${BUILD_ID}-${BUILD_NUMBER}" CURRENTS_API_KEY = credentials('CURRENTS_API_KEY') TOTAL_SHARDS = 3 PARALLEL_JOBS = 4 } options { timeout(time: 60, unit: 'MINUTES') } stages { stage('Checkout') { steps { checkout scm } } stage('Install Dependencies') { steps { sh 'npm ci' sh 'npx playwright install' sh 'rm -rf test-results' sh 'rm -rf .last-run.json' } } stage('Set params CI Build ID') { steps { script { env.CI_BUILD_ID = "${params.CI_BUILD_ID}" echo "CI_BUILD_ID is set to: ${params.CI_BUILD_ID}" } echo "Verify values: ${env.CI_BUILD_ID} ${params.IS_ORCHESTRATION}" } } stage('Run Tests decision') { steps { runTestsDecision(env.CI_BUILD_ID, params.IS_ORCHESTRATION) } } } } def runTestsDecision(ciBuildId, isOrchestration) { if (ciBuildId && ciBuildId != 'none') { stage('Run Tests with last failed') { script { echo "Running tests with last failed: ${ciBuildId} ${env.TOTAL_SHARDS}" script { sh "npx currents api get-run --api-key ${env.CURRENTS_API_KEY} --project-id ${env.CURRENTS_PROJECT_ID} --ci-build-id ${env.CI_BUILD_ID} --pw-last-run --output .last-run.json" sh 'cat .last-run.json' } if (isOrchestration && isOrchestration == true) { runPlaywrightOrchestration(env.PARALLEL_JOBS.toInteger(), true) } else { runPlaywrightSharded(env.TOTAL_SHARDS.toInteger(), true) } } } } else { stage('Run Tests') { script { echo 'Running tests' if (isOrchestration && isOrchestration == true) { runPlaywrightOrchestration(env.PARALLEL_JOBS.toInteger(), false) } else { runPlaywrightSharded(env.TOTAL_SHARDS.toInteger(), false) } } } } } def runPlaywrightSharded(shardTotal, lastFailed) { def parallelStages = [: ] for (int i = 1; i <= shardTotal; i++) { def shardIndex = i parallelStages["shard${shardIndex}"] = { if (lastFailed) { sh "mkdir -p test-results/shard-${shardIndex}" sh "cp .last-run.json test-results/shard-${shardIndex}/.last-run.json" ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.currents.dev/dashboard/administration/sso-saml2.0/azure-ad Use this GET request to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```HTTP GET https://docs.currents.dev/dashboard/administration/sso-saml2.0/azure-ad.md?ask= ``` -------------------------------- ### Get Project Insights Source: https://docs.currents.dev/api/resources/projects Retrieve aggregated run and test metrics for a project within a specified date range. Requires project ID, start date, and end date. Optional parameters include resolution, tags, branches, groups, and authors for filtering. ```json { "openapi": "3.0.2", "info": { "title": "Currents REST API", "version": "1.0.0" }, "tags": [ { "name": "Projects", "description": "Manage and query projects in your organization.\n\nProjects are the top-level containers for test runs, specs, and test results.\nEach project has a unique project ID and can be configured with various settings." } ], "servers": [ { "url": "https://api.currents.dev/v1", "description": "Production API" }, { "url": "https://api-staging.currents.dev/v1", "description": "Staging API" }, { "url": "http://localhost:4000/v1", "description": "Local development" } ], "security": [ { "BearerAuth": [] } ], "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "API key authentication using Bearer token" } }, "parameters": { "ProjectIdPath": { "name": "projectId", "in": "path", "required": true, "description": "The project ID", "schema": { "type": "string" } }, "DateStartQuery": { "name": "date_start", "in": "query", "required": true, "description": "Start date in ISO 8601 format", "schema": { "type": "string", "format": "date-time" } }, "DateEndQuery": { "name": "date_end", "in": "query", "required": true, "description": "End date in ISO 8601 format", "schema": { "type": "string", "format": "date-time" } }, "ResolutionQuery": { "name": "resolution", "in": "query", "required": false, "description": "Time resolution for histogram data", "schema": { "type": "string", "enum": [ "1h", "1d", "1w" ], "default": "1d" } }, "TagsQuery": { "name": "tags[]", "in": "query", "required": false, "description": "Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)", "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true }, "BranchesQuery": { "name": "branches[]", "in": "query", "required": false, "description": "Filter by git branch. Use trailing `*` for prefix match (e.g. `release/*`). Max 250 characters per value.", "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BranchFilterQueryValue" } }, "style": "form", "explode": true }, "GroupsQuery": { "name": "groups[]", "in": "query", "required": false, "description": "Filter by groups (can be specified multiple times using bracket notation, e.g., groups[]=group1&groups[]=group2)", "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true }, "AuthorsQuery": { "name": "authors[]", "in": "query", "required": false, "description": "Filter by git authors (can be specified multiple times using bracket notation, e.g., authors[]=author1&authors[]=author2)", "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true } }, "schemas": { "BranchFilterQueryValue": { "description": "Branch filter value: an exact branch name, or a trailing `*` for prefix match (e.g. `release/*`). Max 250 characters.", "oneOf": [ { "type": "string", "description": "Exact branch name (must not contain `*` or spaces).", "pattern": "^[!-)+-~]+$", "maxLength": 250 }, { "type": "string", "description": "Prefix match: branch prefix followed by `*`.", "pattern": "^[!-)+-~]+\*$", "maxLength": 250 } ] }, "ProjectInsightsResponse": { "type": "object", "required": [ "status", "data" ], "properties": { "status": { "type": "string", "enum": [ "OK" ] }, "data": { "type": "object", "properties": { "projectId": { "type": "string" }, "orgId": { "type": "string" }, "dateStart": { "type": "string", "format": "date-time" }, "dateEnd": { "type": "string", "format": "date-time" }, "resolution": { "type": "string" }, "results": { "type": "object", "properties": { "overall": { "type": "object", "properties": { "runs": { "$ref": "#/components/schemas/RunMetrics" }, "tests": { "$ref": "#/components/schemas/TestMetrics" } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "object", "properties": { "runs": { "$ref": "#/components/schemas/RunMetrics" }, "tests": { "$ref": "#/components/schemas/TestMetrics" } } } } } } } } } } }, "RunMetrics": { "type": "object", "properties": { "total": { "type": "integer", "description": "Total number of runs" }, "cancelled": { "type": "integer", "description": "Cancelled runs" }, "timeouts": { "type": "integer", "description": "Timed out runs" }, "completed": { "type": "integer", "description": "Fully completed runs" }, "failed": { "type": "integer", "description": "Failed runs" }, "passed": { "type": "integer", "description": "Passed runs" }, "nonFullyReported": { "type": "integer", "description": "Runs that did not fully report" }, "avgDurationSeconds": { "type": "number", "description": "Average run duration in seconds" }, "avgSuccessRate": { "type": "number", "description": "Average success rate (0-1)" } } }, "TestMetrics": { "type": "object", "properties": { "total": { "type": "integer", "description": "Total test executions" }, "failed": { "type": "integer", "description": "Failed tests" }, "passed": { "type": "integer", "description": "Passed tests" }, "pending": { "type": "integer", "description": "**pending** outcomes (intentional skips). See `RecordedTestOutcome`." }, "skipped": { "type": "integer", "description": "**skipped** outcomes (runner skip / interrupted). See `RecordedTestOutcome`." }, "flaky": { "type": "integer", "description": "Flaky tests" } } }, "ErrorResponse": { "type": "object" } } } } ``` -------------------------------- ### Get Affected Test Executions by Action Source: https://docs.currents.dev/api/resources/actions Use this endpoint to retrieve a list of test executions where a specific action was applied. Ensure you provide the action ID, a start date, and an end date in ISO 8601 format. Pagination is supported using `starting_after` or `ending_before` cursors. ```http GET /v1/actions/{actionId}/tests?date_start=2023-01-01T00:00:00Z&date_end=2023-01-31T23:59:59Z&limit=10 HTTP/1.1 Host: api.currents.dev Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.currents.dev/dashboard/analytics/test-flakiness Use this GET request to ask questions about the documentation. Include your specific question in the 'ask' query parameter. ```http GET https://docs.currents.dev/dashboard/analytics/test-flakiness.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.currents.dev/dashboard/administration/sso-saml2.0/okta/okta-user-provisioning Demonstrates how to perform an HTTP GET request to query the documentation dynamically using the `ask` query parameter. This is useful for retrieving specific information not explicitly present on the page. ```bash GET https://docs.currents.dev/dashboard/administration/sso-saml2.0/okta/okta-user-provisioning.md?ask= ``` -------------------------------- ### Install @currents/cmd Source: https://docs.currents.dev/getting-started/ci-setup/github-actions/re-run-failed-only-tests/re-run-failed-only-tests-orchestrated-v2 Install the @currents/cmd package as a dev dependency. This is required by the playwright-last-failed action for reproducible installs. ```bash npm i -D @currents/cmd ``` -------------------------------- ### Install Currents Jest and Cmd Packages Source: https://docs.currents.dev/getting-started/other-frameworks/jest/your-first-jest-run Install the necessary packages for Jest integration and command-line operations. Ensure you have Jest v29.5.0+ and Node.js v18.20.4+ installed. ```bash npm install @currents/jest @currents/cmd --save-dev ``` -------------------------------- ### Configure Debug Logging and Uploads with pwc-p Source: https://docs.currents.dev/guides/troubleshooting-playwright Example of enabling full debug logging and uploading logs to Currents using the `pwc-p` command. ```bash npx pwc-p --pwc-debug=full ... ``` -------------------------------- ### Install Currents Playwright Source: https://docs.currents.dev/guides/ci-optimization/playwright-orchestration/playwright-orchestration-v1 Install the `@currents/playwright` package using npm. ```bash npm i @currents/playwright ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.currents.dev/dashboard/analytics/run-completion Use this HTTP GET request to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://docs.currents.dev/dashboard/analytics/run-completion.md?ask= ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://docs.currents.dev/getting-started/other-frameworks/jest/your-first-jest-run Demonstrates how to dynamically query documentation by appending the 'ask' query parameter to a GET request. This is useful for retrieving specific information or clarification. ```http GET https://docs.currents.dev/getting-started/other-frameworks/jest/your-first-jest-run.md?ask= ``` -------------------------------- ### Install Playwright Best Practices Skill Source: https://docs.currents.dev/ai/agent-skill-playwright-best-practices Install the Playwright Best Practices Agent Skill using npx. After installation, the AI will automatically leverage this skill for Playwright-related tasks without further configuration. ```bash npx skills add https://github.com/currents-dev/playwright-best-practices-skill ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.currents.dev/guides/parallelization-guide/ci-build-id Use this method to ask specific questions about the documentation. The response includes direct answers and relevant excerpts. ```bash GET https://docs.currents.dev/guides/parallelization-guide/ci-build-id.md?ask= ```