Skip to main content

List of TestMu AI Cypress CLI Commands

The TestMu AI-Cypress CLI provides a set of commands to streamline and enhance your testing workflows on the TestMu AI platform. Below is a comprehensive list of supported commands and their usage.

General Syntax

To use any command in the TestMu AI-Cypress CLI, follow this basic syntax:

lambdatest-cypress <command> [options]
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

The init command to generate a initial lambdatest configuration file.

lambdatest-cypress init
Image

On running the above command, it will generate base_reporter_config.json,custom_support_file.js and lambdatest-config.json files.

  • base_reporter_config.json: This is the configuration file for mochawesome reporter, that TestMu AI uses to generate mochawesome reports which in turn is used to 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, in order to make the screenshot visible with the failed tests on our dashboard, we recommend you move and import this file as recommended.

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

run command

Note

For detailed examples of each Cypress flag, please visit our guide Configuring Cypress Test Execution.

To start running the test build, you can use the given-below command.

lambdatest-cypress run

Given below are the additional flags available with the run command.

FlagPurposeType
--versionShow version numberBoolean
--helpShow helpBoolean
--ccf, --cypress-config-filePath of the config fileString
--user, --usernameLambdaTest usernameString
--ak, --access_keyLambdaTest access keyString
--lcf, --lambdatest-config-filePath of the LambdaTest 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 LambdaTest tunnelString
--tname, --tunnel_nameSet LambdaTest 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

You can use the build-info command to get information on the build.

lambdatest-cypress build-info

Given below are 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
Image

build-stop command

You can use the build-stop command to stop all the test in the build.

lambdatest-cypress build-stop

Given below are the additional arguments available with the build-stop command.

FlagPurpose
--id, --session_idIdentifies the session
--sls, --stop_last_sessionStop the last test session
  • --stop_last_session
Image
  • --session_id
Image

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles