> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spurtest.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab

> Run Spur test plans automatically on every GitLab merge request and block deployments when tests fail.

## Overview

Spur integrates with GitLab CI/CD to run your test plans automatically on merge requests. The setup follows the same pattern as the GitHub integration — connect GitLab from Spur, configure your test plans, and add the generated pipeline files to your repository.

## What you get

<Columns cols={2}>
  <Card icon="play" title="Automated test execution">
    Test plans run automatically on every merge request without manual intervention.
  </Card>

  <Card icon="circle-check" title="MR status checks">
    Pass/fail results appear directly on your merge requests.
  </Card>

  <Card icon="shield-check" title="Deployment quality gate">
    Tests run right before deployment, catching issues before they reach production.
  </Card>

  <Card icon="lock" title="Branch protection">
    Prevent merging merge requests with failing tests using GitLab's protected branch rules.
  </Card>
</Columns>

## Setup

<Steps>
  <Step title="Go to Integrations">
    Open the [Integrations page](https://app.spurtest.com/integrations) in your Spur dashboard and connect GitLab.
  </Step>

  <Step title="Configure your integration">
    Once connected, select which test plans should run as part of your CI/CD pipeline and configure your settings.
  </Step>

  <Step title="Add pipeline files to your repository">
    Download the generated pipeline configuration and add it to your repository's `.gitlab-ci.yml` file.
  </Step>

  <Step title="Save changes">
    Click **Save Changes** to finalize your integration. From this point, Spur will run your selected test plans automatically on every merge request.
  </Step>
</Steps>

<Note>
  For GitLab-specific setup instructions, reach out to the [Spur team](/additional-resources/contact-us) for guidance on configuring your `.gitlab-ci.yml` file.
</Note>

## Testing deploy previews

Need to test against a feature branch URL or dynamic environment? Use [Override URLs](/running-tests/cicd/override-urls) to redirect tests at runtime without changing your environment settings.
