Skip to main content

Circle CI Pipeline Integration with SmartUI

CircleCI is a popular CI/CD tool known for its speed, flexibility, and seamless integration with version control systems like GitHub and Bitbucket. It is cloud-native and also offers an on-premises solution.

This guide explains how to integrate your project with the CircleCI CI/CD pipeline to trigger visual regression testing with LambdaTest SmartUI whenever changes are made to your repository.

Steps to Integrate CircleCI Pipeline with SmartUI

To integrate CircleCI Pipeline with SmartUI, follow the below steps. You can use your own project to configure and test it. For demo purposes, we are using the sample repository.

Sample repo

Download or Clone the code sample from the LambdaTest GitHub repository to run the tests on the SmartUI.

Image View on GitHub

Step 1: Set Up Your Repository

Ensure your project is hosted in GitHub, or any supported repository.

Step 2: Create a New Pipeline:

  • Navigate to Pipelines in your CircleCI project.
  • Select New Pipeline and connect your repository.

Step 3: Add Environment Variables

Go to Pipeline Settings > Variables. Add the following variables:

  • LT_USERNAME: Your LambdaTest username.
  • LT_ACCESS_KEY: Your LambdaTest access key.

Step 4: Setup your Workflow

.circleci/config.yml
version: 2.1
jobs:
smartui_test:
docker:
- image: circleci/node:16
environment:
LT_USERNAME: $LT_USERNAME
LT_ACCESS_KEY: $LT_ACCESS_KEY
steps:
- checkout
- run:
name: Install Dependencies
command: npm install @lambdatest/smartui-cli
- run:
name: Execute SmartUI Tests
command: |
npx smartui --version
npx smartui config:create smartui-web.json
npx smartui --config smartui-web.json exec -- mvn --quiet test -D suite=sdk-cloud.xml

workflows:
version: 2
smartui_pipeline:
jobs:
- smartui_test

Step 5: Check the output

Create New Project

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

Book Demo

Help and Support

Related Articles