{"id":17024,"library":"lambdatest-cypress-cli","title":"LambdaTest Cypress CLI","description":"The `lambdatest-cypress-cli` is a command-line interface developed by LambdaTest to facilitate running Cypress end-to-end tests on the LambdaTest cloud-based cross-browser testing platform. Currently stable at version 3.0.50, the package demonstrates an active release cadence with frequent minor updates and fixes, as seen in its detailed changelog, which often includes multiple releases within short periods. Its core functionality involves configuring and executing Cypress test suites across a vast array of browser and operating system combinations provided by LambdaTest's online Selenium Grid, differentiating it from local Cypress test runners by offering scalable cloud execution and comprehensive test analytics. Users interact with the CLI to initialize configuration files, set up authentication credentials, define target browsers, and manage test execution parameters like parallel sessions and Cypress versions.","status":"active","version":"3.0.50","language":"javascript","source_language":"en","source_url":"git://github.com/LambdaTest/lambdatest-cypress-cli","tags":["javascript","cypress","browser testing","plugin","lambdatest"],"install":[{"cmd":"npm install lambdatest-cypress-cli","lang":"bash","label":"npm"},{"cmd":"yarn add lambdatest-cypress-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add lambdatest-cypress-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This CLI is invoked directly from the command line after global installation or via `npx`. Programmatic `require()` or `import` of internal modules is not officially supported or intended.","wrong":"node path/to/cli.js","symbol":"lambdatest-cypress run","correct":"lambdatest-cypress run"},{"note":"Used to create the initial `lambdatest-cypress.json` configuration file in your project directory.","wrong":"npx lambdatest-cypress setup","symbol":"lambdatest-cypress init","correct":"lambdatest-cypress init"},{"note":"While global installation (`npm install -g`) is common, `npx` allows running the CLI without global installation, using the version defined in your project's `node_modules`.","wrong":"lambdatest-cypress run (if not globally installed)","symbol":"npx lambdatest-cypress","correct":"npx lambdatest-cypress run"}],"quickstart":{"code":"npm install -g lambdatest-cypress-cli\n\n# Set LambdaTest credentials as environment variables\nexport LT_USERNAME=\"$LT_USERNAME\"\nexport LT_ACCESS_KEY=\"$LT_ACCESS_KEY\"\n\n# Initialize the configuration file (lambdatest-cypress.json)\nlambdatest-cypress init\n\n# Edit lambdatest-cypress.json to configure browsers, OS, and test settings.\n# Example modification (after init creates the file):\n# Ensure your project's Cypress version matches 'cypress_version' in run_settings.\n\n# Run your Cypress tests on LambdaTest\nlambdatest-cypress run","lang":"bash","description":"Demonstrates global installation, setting up authentication, initializing the configuration, and executing Cypress tests on the LambdaTest platform."},"warnings":[{"fix":"Ensure `LT_USERNAME` and `LT_ACCESS_KEY` are properly exported in your environment before invoking `lambdatest-cypress run`. Consider using a CI/CD secret management system for these credentials.","message":"Authentication to LambdaTest requires setting `LT_USERNAME` and `LT_ACCESS_KEY` environment variables. Failing to set these will prevent tests from running on the platform.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always run `lambdatest-cypress init` first to generate a template configuration. Carefully review and update the `auth`, `browsers`, and `run_settings` sections according to your project's requirements and LambdaTest's documentation.","message":"The `lambdatest-cypress.json` configuration file is crucial for defining browsers, OS, Cypress versions, and other test parameters. Running `lambdatest-cypress run` without this file, or with an improperly configured one, will lead to errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If experiencing proxy issues, review your proxy configuration and LambdaTest's documentation on proxy support. For older versions, manual proxy configuration might be required. If upgrading, test thoroughly to ensure existing proxy setups are not negatively impacted by the `reject_unauthorized` change.","message":"Support for authenticated proxies and resilience for feature flags were improved in version `3.0.50-prod`. Specifically, `reject_unauthorized` now defaults to `false` for proxy compatibility. This change might subtly alter behavior for users with custom proxy configurations, potentially resolving or introducing certificate-related issues depending on their setup.","severity":"breaking","affected_versions":">=3.0.50-prod"},{"fix":"Verify that the `cypress_version` in your `lambdatest-cypress.json` accurately reflects the Cypress version dependency in your `package.json` file. Update it if there's a discrepancy.","message":"The `cypress_version` specified in your `lambdatest-cypress.json`'s `run_settings` must be compatible with or match the Cypress version used in your local project for accurate test execution on the LambdaTest grid. Mismatches can lead to unexpected failures or behavior.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Before running `lambdatest-cypress`, execute `export LT_USERNAME=\"your_username\"` and `export LT_ACCESS_KEY=\"your_access_key\"` (replace placeholders with actual credentials) or use a `.env` file loader.","cause":"The LambdaTest username or access key environment variables (`LT_USERNAME`, `LT_ACCESS_KEY`) are not defined in the shell where the CLI is being executed.","error":"LT_USERNAME and LT_ACCESS_KEY are not set. Please set the environment variables."},{"fix":"Run `lambdatest-cypress init` in your project's root directory to generate the default configuration file, then customize it as needed.","cause":"The required `lambdatest-cypress.json` configuration file is missing from the current working directory.","error":"Error: Configuration file (lambdatest-cypress.json) not found. Please run 'lambdatest-cypress init' to create one."},{"fix":"Install the package globally using `npm install -g lambdatest-cypress-cli` or execute the command using `npx lambdatest-cypress run` (for local installation).","cause":"The `lambdatest-cypress` command is not available in your system's PATH, typically because the package was not installed globally or `npx` is not being used.","error":"command not found: lambdatest-cypress"},{"fix":"Upgrade to `lambdatest-cypress-cli@3.0.50-prod` or higher, which defaults `reject_unauthorized` to `false` for proxy compatibility. Alternatively, configure your Node.js environment to trust the proxy's certificate, or set `NODE_TLS_REJECT_UNAUTHORIZED=0` (use with caution in production).","cause":"This error often indicates issues with proxy configuration, specifically when a corporate proxy uses a self-signed certificate that Node.js does not trust by default.","error":"Error: tunneling socket could not be established, cause=self signed certificate in certificate chain"}],"ecosystem":"npm","meta_description":null}