For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

Cypress CLI Commands Supported on TestMu AI


When you run Cypress tests on TestMu AI, the lambdatest-cypress CLI is how you initialize config, start builds, check build status, and generate reports from your terminal. This page lists every supported command and flag, with its purpose and value type, so you can look up the exact syntax while scripting a run.

General Syntax​


Every TestMu AI Cypress CLI command follows the same pattern: the CLI name, a command, then optional flags. Use this basic syntax as the template for the commands documented below.

Verified
lambdatest-cypress <command> [options]

The table below lists the top-level commands and Visual UI arguments available across the CLI.

Command / ArgPurpose
--helpTo get information of all the commands that can be run
initTo create an initial config file
runTo run tests on TestMu AI
build-infoTo get information about the build
build-stopTo stop all the tests in the build
generate-reportTo generate the test session report
--vip, --vi-projectTo set the smart ui project name.
The acceptable data type is string
--vib , --vi-buildTo set the smart ui build name.
The acceptable data type is string
--vibase , --vi-baseTo set that build as baseline for smart ui.
The acceptable data type is boolean

init Command​


Run the init command to generate an initial TestMu AI configuration file for your project. It scaffolds the config and reporter files the CLI needs before its first run.

Verified
lambdatest-cypress init
Terminal output after running the lambdatest-cypress init command

On running the above command, the CLI generates the base_reporter_config.json, custom_support_file.js, and lambdatest-config.json files.

  • base_reporter_config.json: This is the configuration file for the mochawesome reporter that TestMu AI uses to generate mochawesome reports, which in turn generate the commands section on the TestMu AI dashboard. For Cypress 10, the absence of this file may lead to the commands section not being visible on the dashboard.

  • custom_support_file.js: By default, Cypress automatically captures screenshots when a test fails. For Cypress 10, to make the screenshot visible with the failed tests on the TestMu AI dashboard, move and import this file as recommended.

  • lambdatest-config.json: This file contains configurations like TestMu AI credentials, capabilities, and run settings that are required to run the test.

run Command​


The run command starts a Cypress test build on TestMu AI and accepts a large set of flags to control browsers, parallelism, tunneling, and reporting.

Note

For detailed examples of each Cypress flag, see how to configure Cypress run settings.

To start running the test build, use the command below.

Verified
lambdatest-cypress run

The table below lists the additional flags available with the run command, along with each flag's purpose and value type.

FlagPurposeType
--versionShow version numberBoolean
--helpShow helpBoolean
--ccf, --cypress-config-filePath of the config fileString
--user, --usernameTestMu AI usernameString
--ak, --access_keyTestMu AI access keyString
--lcf, --lambdatest-config-filePath of the TestMu AI config fileString
-s, --specsPath of the spec file, directory, or patternString
--env, --environmentSpecify environment nameString
--bn, --build-nameSet build nameString
-t, --tagsRun tests with specific tagsString
-p, --parallelsNumber of parallel sessionsString
--envs, --env-variablesSet environment variables before test executionString
--tun, --tunnelEnable TestMu AI tunnelString
--tname, --tunnel_nameSet TestMu AI tunnel nameString
--brs, --browsersRun tests on specified browsers in format platform:browser:versionString
--bi, --build-identifierSet build identifier or build counterString
--if, --ignore_filesFiles to ignore in project zipString
--sync, --sync-modeEnable sync mode to wait for test completionString
--autostart, --tatEnable tunnel auto startString
--headless, --headless-modeRun tests in headless modeBoolean
--net, --networkCapture network logsString
--eof, --exit-on-failureExit with code 1 on failureString
--cy, --cypress_settingsPass Cypress settingsString
--geo, --geo_locationPass geo country codeString
--sof, --stop_on_failureStop other tests if any test in session failsBoolean
--ra, --reject_unauthorizedReject self-signed certificates in external requestsBoolean
--bt, --build-tagsSet build tagsString
--sys-envs, --sys-env-variablesSet system environment variables during test runString
--envfl, --env-filePath of .env fileString
--npm-f, --npm-forceForce npm installBoolean
--npm-lpd, --legacy-peer-depsUse legacy peer dependencies during npm installBoolean
--vip, --vi-projectSet Visual UI project nameString
--vib, --vi-buildSet Visual UI build nameString
--vibase, --vi-baseSet Visual UI baseline buildBoolean
--res, --resolutionSet machine resolutionString
--dp, --dedicated_proxyEnable dedicated proxyBoolean
--npm_tun, --npm_via_tunnelInstall npm packages behind private VPN (increases build duration)Boolean
--md, --max_durationStop test if running longer than specified minutesString
--cmd_log, --command_logShow command logs on dashboardString
--ret_fail, --retry_failedRetry failed tests in a new buildBoolean
--net_http2, --network_http2Capture HTTP2 network logsBoolean
--net_ws, --network_wsBypass WebSocket calls for network logsBoolean
--node18, --useNode18Use Node.js v18 for Cypress runtimeBoolean
--nodeV, --useNodeVersionSpecify Node.js version for Cypress runtimeString
--net_sse, --network_sseBypass SSE events for network logsBoolean
--cypress_accessibility, --accessibilityEnable accessibility testing for CypressBoolean
--tz, --timezoneSet custom timezone in machineString
--reg, --regionSet data center region (e.g., us, eu, ap)String
--pC, --privateCloudSet custom private cloudString

build-info Command​


Use the build-info command to fetch details about a specific build, such as its status and session breakdown, from the terminal.

Verified
lambdatest-cypress build-info

The table below lists the additional arguments available with the build-info command.

FlagPurposeType
--id, --build-idBuild IdentifierString, Required
--user, --usernameYour TestMu AI usernameString
--ak, --access_keyYour TestMu AI access keyString
Terminal output of the lambdatest-cypress build-info command showing build details

build-stop Command​


Use the build-stop command to stop all the tests in a build, either by session id or by targeting the last test session.

Verified
lambdatest-cypress build-stop

The table below lists the additional arguments available with the build-stop command.

FlagPurpose
--id, --session_idIdentifies the session
--sls, --stop_last_sessionStop the last test session

Passing --stop_last_session stops the most recent test session.

Terminal output of build-stop using the stop_last_session flag

Passing --session_id stops the specific session you identify.

Terminal output of build-stop using the session_id flag

Continue with the guides below to run and scale your Cypress tests on TestMu AI.

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles