debian-mirror-gitlab/doc/ci/test_cases/index.md

96 lines
3.4 KiB
Markdown
Raw Normal View History

2021-02-22 17:27:13 +05:30
---
stage: Plan
2023-05-27 22:25:52 +05:30
group: Product Planning
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-02-22 17:27:13 +05:30
description: Test cases in GitLab can help your teams create testing scenarios in their existing development platform.
type: reference
---
2023-05-27 22:25:52 +05:30
# Test cases **(ULTIMATE)**
2021-02-22 17:27:13 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233479) in GitLab 13.6.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/241983) in GitLab 13.7.
Test cases in GitLab can help your teams create testing scenarios in their existing development platform.
2021-04-17 20:07:23 +05:30
Now your Implementation and Testing teams can collaborate better, as they no longer have to
2021-02-22 17:27:13 +05:30
use external test planning tools, which require additional overhead, context switching, and expense.
2023-06-20 00:43:36 +05:30
NOTE:
[Requirements](../../user/project/requirements/index.md) and test cases are being
[migrated to work items](https://gitlab.com/groups/gitlab-org/-/epics/5171).
[Issue 323790](https://gitlab.com/gitlab-org/gitlab/-/issues/323790) proposes to link requirements to test cases.
For more information, see [Product Stage Direction - Plan](https://about.gitlab.com/direction/plan/).
2021-02-22 17:27:13 +05:30
## Create a test case
2021-12-11 22:18:48 +05:30
Prerequisite:
2022-04-04 11:22:00 +05:30
- You must have at least the Reporter role.
2021-02-22 17:27:13 +05:30
To create a test case in a GitLab project:
2023-05-27 22:25:52 +05:30
1. Go to **CI/CD > Test cases**.
2023-03-17 16:20:25 +05:30
1. Select **New test case**. You are taken to the new test case form. Here you can enter
2021-02-22 17:27:13 +05:30
the new case's title, [description](../../user/markdown.md), attach a file, and assign [labels](../../user/project/labels.md).
2023-03-17 16:20:25 +05:30
1. Select **Submit test case**. You are taken to view the new test case.
2021-02-22 17:27:13 +05:30
## View a test case
2023-05-27 22:25:52 +05:30
You can view all test cases in the project in the test cases list. Filter the
2021-02-22 17:27:13 +05:30
issue list with a search query, including labels or the test case's title.
2021-12-11 22:18:48 +05:30
Prerequisite:
2022-11-25 23:54:43 +05:30
Whether you can view an test case depends on the [project visibility level](../../user/public_access.md):
- Public project: You don't have to be a member of the project.
- Private project: You must have at least the Guest role for the project.
2021-02-22 17:27:13 +05:30
To view a test case:
2023-05-27 22:25:52 +05:30
1. In a project, go to **CI/CD > Test cases**.
2021-02-22 17:27:13 +05:30
1. Select the title of the test case you want to view. You are taken to the test case page.
2021-04-17 20:07:23 +05:30
![An example test case page](img/test_case_show_v13_10.png)
2021-02-22 17:27:13 +05:30
## Edit a test case
You can edit a test case's title and description.
2021-12-11 22:18:48 +05:30
Prerequisite:
2022-04-04 11:22:00 +05:30
- You must have at least the Reporter role.
2021-12-11 22:18:48 +05:30
- Users demoted to the Guest role can continue to edit the test cases they created
2021-02-22 17:27:13 +05:30
when they were in the higher role.
To edit a test case:
1. [View a test case](#view-a-test-case).
1. Select **Edit title and description** (**{pencil}**).
1. Edit the test case's title or description.
1. Select **Save changes**.
## Archive a test case
When you want to stop using a test case, you can archive it. You can [reopen an archived test case](#reopen-an-archived-test-case) later.
2021-12-11 22:18:48 +05:30
Prerequisite:
2022-04-04 11:22:00 +05:30
- You must have at least the Reporter role.
2021-02-22 17:27:13 +05:30
2023-03-17 16:20:25 +05:30
To archive a test case, on the test case's page, select **Archive test case**.
2021-02-22 17:27:13 +05:30
To view archived test cases:
2023-05-27 22:25:52 +05:30
1. Go to **CI/CD > Test cases**.
2021-02-22 17:27:13 +05:30
1. Select **Archived**.
## Reopen an archived test case
If you decide to start using an archived test case again, you can reopen it.
2022-04-04 11:22:00 +05:30
You must have at least the Reporter role.
2021-02-22 17:27:13 +05:30
To reopen an archived test case, on the test case's page, select **Reopen test case**.