Skip to content

Test cases

DETAILS: Tier: Ultimate Offering: SaaS, self-managed

Test cases in GitLab can help your teams create testing scenarios in their existing development platform.

Now your Implementation and Testing teams can collaborate better, as they no longer have to use external test planning tools, which require additional overhead, context switching, and expense.

NOTE: Requirements and test cases are being migrated to work items. Issue 323790 proposes to link requirements to test cases. For more information, see Product Stage Direction - Plan.

Create a test case

Prerequisites:

  • You must have at least the Reporter role.

To create a test case in a GitLab project:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Build > Test cases.
  3. Select New test case. You are taken to the new test case form. Here you can enter the new case's title, description, attach a file, and assign labels.
  4. Select Submit test case. You are taken to view the new test case.

View a test case

You can view all test cases in the project in the test cases list. Filter the issue list with a search query, including labels or the test case's title.

Prerequisites:

  • Non-confidential test case in a public project: You don't have to be a member of the project.
  • Non-confidential test case in a private project: You must have at least the Guest role for the project.
  • Confidential test case (regardless of project visibility): You must have at least the Reporter role for the project.

To view a test case:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Build > Test cases.
  3. Select the title of the test case you want to view. You are taken to the test case page.

An example test case page

Edit a test case

You can edit a test case's title and description.

Prerequisites:

  • You must have at least the Reporter role.
  • Users demoted to the Guest role can continue to edit the test cases they created when they were in the higher role.

To edit a test case:

  1. View a test case.
  2. Select Edit title and description ({pencil}).
  3. Edit the test case's title or description.
  4. Select Save changes.

Make a test case confidential

  • Introduced for new and existing test cases in GitLab 16.5.

If you're working on a test case that contains private information, you can make it confidential.

Prerequisites:

  • You must have at least the Reporter role.

To make a test case confidential:

  • When you create a test case: under Confidentiality, select the This test case is confidential... checkbox.
  • When you edit a test case: on the right sidebar, next to Confidentiality, select Edit, then select Turn on.

You can also use the /confidential quick action when both creating a new test case or editing an existing one.

Archive a test case

When you want to stop using a test case, you can archive it. You can reopen an archived test case later.

Prerequisites:

  • You must have at least the Reporter role.

To archive a test case, on the test case's page, select Archive test case.

To view archived test cases:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Build > Test cases.
  3. Select Archived.

Reopen an archived test case

If you decide to start using an archived test case again, you can reopen it.

Prerequisites:

  • You must have at least the Reporter role.

To reopen an archived test case:

  1. View a test case.
  2. Select Reopen test case.