NX
Running cypress tests in parallel with Currents for NX projects
Running cypress tests in NX project with Currents
Nx is a build system with monorepo support and powerful integrations. You can run cypress tests on Currents using @currents/nx plugin and defining a few configuration options.
Example
See https://github.com/currents-dev/currents-nx for an example installation and configuration
Setting up cypress with NX
First, install @currents/nx npm package.
npm i --save-dev @currents/nx cypress-cloud
# install cypress if needed
npm i --save-dev cypressAdd currents target to your project configuration.
{
"targets": {
"currents": {
"executor": "@currents/nx:currents",
"options": {
"record": true,
"parallel": true,
"cypressConfig": "apps/app-e2e/cypres.config.ts",
"devServerTarget": "my-react-app:serve",
"testingType": "e2e"
}
}
}
}
Create a new configuration file: currents.config.js next to cypress.config.{jt}s
Add cypress-cloud/plugin to cypress.config.{js|ts|mjs}
Usage
Update your
currents.config.jsfile withprojectIdobtained at https://app.currents.devUse the record key obtained at https://app.currents.dev
Learn more about CI Build ID
Last updated
Was this helpful?