# cypress-cloud

{% hint style="info" %}
Please refer to the most recent documentation published in the GitHub repository

<https://github.com/currents-dev/cypress-cloud>
{% endhint %}

{% hint style="warning" %}
**We are suspending our support of integration with Cypress starting from version 13**.

We will continue to support [older versions of Cypress](https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries) and provide assistance to the affected customers. Please contact our support channels for details.

[Read more](https://currents.dev/posts/v13-blocking)
{% endhint %}

### Setup

Install the package:

```sh
npm install cypress-cloud
```

Create a new configuration file: `currents.config.js` in the project’s root, set the `projectId` and the record key obtained from [Currents](https://app.currents.dev/) or your self-hosted instance of Sorry Cypress:

```javascript
// currents.config.js
module.exports = {
  projectId: "Ij0RfK",
  recordKey: "xxx",
  // Sorry Cypress users - set the director service URL
  cloudServiceUrl: "http://cy.currents.dev",
};
```

Add `cypress-cloud/plugin` to `cypress.config.{j|t}s`

{% tabs %}
{% tab title="cypress.config.js" %}

```javascript
// cypress.config.js
const { defineConfig } = require("cypress");
const { cloudPlugin } = require("cypress-cloud/plugin");
module.exports = defineConfig({
  e2e: {
    // ...
    async setupNodeEvents(on, config) {
      const result = await cloudPlugin(on, config);
      return result;
    },
  },
});
```

{% endtab %}

{% tab title="cypress.config.ts" %}

```typescript
import { defineConfig } from "cypress";
import currents from "cypress-cloud/plugin";

export default defineConfig({
  e2e: {
    // ...
    async setupNodeEvents(on, config) {
      const result = await currents(on, config);
      return result;
    },
  }
});
```

{% endtab %}
{% endtabs %}

Add `cypress-cloud/support` to [cypress support](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Support-file) file

```typescript
require("cypress-cloud/support");
```

#### Setup with existing plugins

Please refer to our [collection of guides](https://github.com/currents-dev/cypress-cloud#configuration) for setting up `cypress-cloud` together with other plugins

### Usage

{% code overflow="wrap" %}

```sh
npx cypress-cloud --parallel --record --ci-build-id hello-cypress-cloud
```

{% endcode %}

See all the available options `npx cypress-cloud --help`. Learn more about [CI Build ID](https://currents.dev/readme/guides/cypress-ci-build-id).

### Documentation

{% hint style="info" %}
Please refer to the most recent documentation published in the GitHub repository

<https://github.com/currents-dev/cypress-cloud>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.currents.dev/resources/reporters/cypress-cloud.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
