Skip to main content

GitLab Pipeline Integration with SmartUI

A GitLab Pipeline automates building, testing, and deploying code changes. It's essential for rapid development, improved code quality, and faster delivery by catching errors early and reducing manual work.

This document will show you how to integrate GitLab Pipeline with SmartUI to shorten your test cycles.

Steps to Integrate GitLab Pipeline with SmartUI

To integrate GitLab 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: Setup your Projects in GitLab

  • Click on the New Project > Run CI/CD for external repository.
Create New Project
  • Enter your repository URL and click on Create Project.

Step 2: Create a New Workflow

  • Navigate to the Build section > Pipelines.
Create New Project
  • Select your required template for CI/CD workflow file. For the demo we are using the Test template.
  • Now, write your workflow YAML file. Here is the sample file for your reference.
  • Commit this yaml file in your repository and make the required changes in your code to automatically trigger the pipeline.
.gitlab-ci.yml
loading...
tip

You can also store your LT_USERNAME, LT_ACCESS_KEY and PROJECT_TOKEN as secrets in your GitLab project repository.

Step 3: Check the output

Create New Project

Best Practices

Secret Management

  • Never commit credentials to repository
  • Use GitLab CI/CD Variables for all sensitive data
  • Rotate secrets regularly
  • Use different secrets for different environments

Troubleshooting

Issue: Pipeline Fails with "Variable Not Found"

Symptoms: Pipeline fails with error about missing CI/CD variables

Possible Causes:

  • Variables not created in GitLab project
  • Variable names don't match
  • Variables not accessible to pipeline

Solutions:

  1. Verify variables exist in project settings:

    • Go to Settings → CI/CD → Variables
    • Check LT_USERNAME, LT_ACCESS_KEY, and PROJECT_TOKEN exist
  2. Ensure variable names match exactly (case-sensitive)

  3. Check variable scope (project, group, or instance level)

  4. Verify variables are not protected if needed for protected branches

Additional Resources

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

Book Demo

Help and Support

Related Articles