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

How to Integrate Applitools With Cypress on TestMu AI


If you run Cypress tests with Applitools Visual AI, you can execute those visual checks across real browsers and operating systems by connecting them to TestMu AI. This catches visual regressions on the browser and OS combinations your users actually run, not just your local machine. You configure the Applitools access token and TestMu AI credentials in your project, then run the tests through the TestMu AI CLI.

note

Before you begin, create accounts on both the TestMu AI and Applitools platforms.

Set Up Applitools Dependencies and Packages​


Start by installing the Applitools packages and adding your API key so Cypress can send visual checks to Applitools. Download or clone the sample GitHub project from the Cypress-LambdaTest-Applitools-Integration repository, navigate to your project directory, and follow these steps.

  • Install the NPM dependencies using the below command:

    Verified
    npm install
  • Set up Applitools Eyes using the below command:

    Verified
    npx eyes-setup
  • Add the access token of your Applitools account in the applitools.config.js file as highlighted in the screenshot below. Find your Applitools API key by logging into your Applitools account and going to Profile > My API Key.

    Applitools access token added to the applitools.config.js configuration file
    tip

    Set the testConcurrency and browser configuration values to match your requirements.

  • Install Applitools Eyes dependencies using the below command:

    Verified
    npm install @applitools/eyes-cypress --save-dev

    This adds Applitools Eyes to an existing Node.js Cypress project.

Set Up the TestMu AI CLI and Dependencies​


With Applitools ready, configure the TestMu AI CLI so the tests run on the cloud grid. These steps install the CLI, generate a config file, and add your credentials.

  • Install the TestMu AI CLI using the below command:

    Verified
    npm install -g lambdatest-cypress-cli
  • Set up the configuration for your test run using the below command:

    Verified
    lambdatest-cypress init

    This creates a lambdatest-config.json file in the root directory of your project.

  • Add the spec file path in the run_setting and your TestMu AI credentials in the auth section of the lambdatest-config.json file as shown in the image below.

    Spec file path and TestMu AI credentials configured in the lambdatest-config.json file

Run the Sample Project​


Run the sample tests to generate a baseline and then compare a second run against it. Execute your first test case using the below command:

Verified
lambdatest-cypress run
TestMu AI Cypress run command executing the first Applitools test in the terminal

Applitools treats the first test case you execute as the base image by default.

First Applitools test run captured as the baseline image in the Applitools dashboard

Edit the URL in the applitoolsIntegration.spec.js file and run your second test using the same run command.

Updated URL in the applitoolsIntegration.spec.js file for the second test run

Applitools compares the base image with this test and highlights the difference.

Applitools highlighting the visual difference between the baseline and the second test run

Continue with the guides below to run and report on 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