@currents/cli
Setup and usage instructions for Cypress integration with Currents Dashboard
Last updated
Setup and usage instructions for Cypress integration with Currents Dashboard
Last updated
In Feb 2023, Cypress.io team decided to to its internal orchestration and recording protocol, preventing the use of @currents/cli (affected versions are 12.6.0+).
is a small npm package that allows seamless integration of cypress with Currents cloud orchestration service. The package contains an executable script that provides the same CLI and API experience as the original cypress package - they are 100% interchangeable.
In fact, currents runs cypress command behind the scenes, passing down all the CLI flags or API options. currents requires cypress to be installed.
Install both cypress and @currents/cli packages on your system
Use currents
the same way you are using cypress
- it accepts the same flags and configuration options. Usually, you end up running a somewhat similar command as part of your CI build:
Learn more about obtaining a Record Key and generating a CI Build ID
run
Example:
spawn
Spawn Cypress as a child process and inherit all the flags and environment variables. It invokes process.exit
with the child process' exit code at the end of its execution.
Example:
Please refer to Compatibility.
@currents/cli
[deprecated]Deprecated: this functionality was deprecated in @currents/cli@4+
The package contains a few other utilities:
currents-prepare
- reconfigures cypress to use Currents dashboard without automatically launching cypress runner
currents-reset
- restores the original Cypress runner configuration
currents-prepare
CLI [deprecated]Deprecated: this functionality was deprecated in @currents/cli@4+
currents-prepare
can be useful when you need to invoke custom scripts that run cypress
behind the scenes.
Please note: this functionality is only relevant for versions 3 and below.
Older versions of @currents/cli (prior to 3) were used to modify cypress installation. Use one of the following methods for restoring the original cypress configuration and removing Currents from cypress package:
Run npx currents-reset
from @currents/cli
npm package to restore the original configuration
Run cypress install --force
to install a fresh version of cypress binaries
Reinstall cypress npm package from scratch
Running the commands in an interactive shell (or VSCode) can fail withEPERM: operation not permitted
error.
You need to explicitly allow the shell app (or VSCode) to modify other applications.
Add the app to the App Management allowed list to stop the error.
Mac OS Settings > Privacy and Security > App Management
Please note: the documentation below is for the most recent version of the package. Please refer to the package for details about the previous versions.
Run Cypress via its
currents
CLI tool uses the public APIs of cypress runner. It connects the runner to Currents servers for orchestration, parallelization and reporting the results. It uses another open-source tool from the sorry-cypress project ().
For example: let's say you have a custom script that's starting cypress via its . Before running the custom script, you'd run currents-prepare.
It will change cypress configuration to use Currents Dashboard:
Remove the