# GitLab

> Connect GitLab so every merge request your team raises reaches Context Management, ready to map to a sprint for test generation.

The Arcus GitLab integration sends every merge request your team raises to [QI Home](https://testsigma.com/docs/arcus/v2/qi-home/overview/), where Arcus generates test cases from its code changes.

## Prerequisites

- An active Arcus project.
- Admin access to the GitLab group.

## Connect GitLab

Developers don't change how they work. Once GitLab is connected, every merge request reaches Arcus on its own.

1. In the left navigation, go to **Settings > Integrations**, and click **Connect** next to **GitLab**.

2. Sign in to GitLab if prompted, and select the GitLab group to connect.

3. Select all projects, or choose specific projects.

4. Click **Authorize**. GitLab redirects you to Arcus.

5. In the **Connect GitLab** dialog, select the **Workspace** and **Project** to link this connection to.

6. Click **Connect**.

Merge requests raised in the connected projects now arrive on the **Unlinked Contexts** tab of Context Management.

## Map merge requests automatically

With a tracker such as [Jira](https://testsigma.com/docs/arcus/v2/integrations/project-management/jira/) connected, a merge request whose title or description contains a ticket ID such as `PROJ-123` goes straight to the sprint holding that story. It never reaches **Unlinked Contexts**, and nobody maps it manually.

A merge request with no ticket ID lands in **Unlinked Contexts** whether or not a tracker is connected. Map it manually from there.

## Verify the connection

1. In the left navigation, go to **Settings > Integrations**.

2. Under **GitLab**, confirm the group name and project list appear with a **Connected** status.

3. Raise a test merge request in one of the connected projects.

4. Open **QI Home > Context Management**. The merge request appears on the **Unlinked Contexts** tab within a few seconds.

## Map a merge request

On **Unlinked Contexts**, click **Map to Module** on the merge request, then pick a sprint and its stories, or an Adhoc session. Arcus generates test cases from the merge request's changes, and the entry moves to **Linked Contexts**.

The full steps, including mapping several entries at once and discarding one that isn't relevant, are in [Context Management](https://testsigma.com/docs/arcus/v2/qi-home/context-management/#map-a-context).

If the same work was captured by a coding tool plugin, Arcus joins the merge request with that session. Mapping one maps both.
