---
title: "Link test cases"
section: "Analyze"
description: "Trace SmartestQA requirements to tests: link test cases to sub-requirements, order them, generate them with AI, and keep pipelines in sync."
url: https://docs.smartestqa.ai/en/analyze-test-cases.html
audience: [customer, admin]
updated: 2026-11-08
keywords: "link test case requirement traceability sub requirement add test case remove reorder automate generate test cases pipeline scheduler sync coverage unlinked"
---
# Analyze: Link test cases to requirements

Traceability in SmartestQA runs through sub-requirements: each one lists the test cases that prove it, in the order they should run. Pipelines and coverage numbers read these links.

## In short

**On this page you can**

- Link existing Automate test cases to a sub-requirement .
- Order the test cases of a sub; pipelines run them in that order.
- Generate 1–3 new test cases for one sub with Automate .
- See every test case of a main requirement and its subs in one list.
- Update the pipelines that run a requirement after its links change.

**How to use it**

1. Open the main requirement and click a sub-requirement in Sub Requirements .
2. In Test Cases on the right, click Add and pick test cases.
3. Drag them into order, then click Save .
4. If Update Scheduler Parameters opens, choose the pipelines and click Update .

## How links work

- **Test cases link to sub-requirements.** A main requirement has no direct links; its list shows the test cases of all its subs together.
- **Many to many.** One test case can prove several sub-requirements, and one sub can have several test cases.
- **Order matters.** The order of test cases inside a sub, and of subs inside a main, is stored. A [pipeline that includes the requirement](https://docs.smartestqa.ai/en/schedule-create.html#add-content) runs them in this order.
- **Links are kept on archive.** Archiving a requirement keeps its links; removing a sub-requirement and saving deletes them. See [Archive](https://docs.smartestqa.ai/en/analyze-folders.html#archive).

## Link an existing test case

1. **Select the sub-requirement**

   Open the main requirement and click the sub in [**Sub Requirements**](https://docs.smartestqa.ai/en/analyze-requirements.html#sub-requirements). The right panel switches to that sub. With the main selected, **Add** is disabled: “Please select a Sub Requirement first.”
2. **Click Add**

   In the **Test Cases** section of **Detail**, click **Add**. The **Test Case List** dialog shows your [Automate tree](https://docs.smartestqa.ai/en/automate-test-cases.html#folders).
3. **Pick test cases**

   Click each test case to link. “*name* added” confirms it. A test case that is already linked shows “This test case is already added to the Sub Requirement.”
4. **Order and save**

   Close the dialog, drag the test cases into the order they should run, and click **Save** in the centre.

   “Requirement saved successfully”. Links are stored only now.

- **Remove** a link with **Remove** on its row (“Test case has been removed from the Sub Requirement.”), then click Save to store it. The test case stays in Automate.
- **Search** the list with the magnifier (**Search Test Case**).
- **Open** a test case by clicking its name: it opens in [Automate](https://docs.smartestqa.ai/en/automate-editor.html#editor-screen).
- **Reorder** works only in the sub view; the main view shows all subs’ test cases read-only in one list.

You can also link from the other side: in **Automate**, a test case [lists the requirements it is connected to](https://docs.smartestqa.ai/en/automate-editor.html#test-case-detail) and lets you add sub-requirements there.

## Generate test cases for one sub-requirement

Use this when a sub-requirement exists but has no test cases. For a whole document, the [AI wizard](https://docs.smartestqa.ai/en/analyze-import.html) is faster.

1. **Save the sub first**

   **Automate** on the sub’s row is available only after the sub-requirement has been saved. Its description must be at least 10 characters.
2. **Click Automate, then Analyze**

   The dialog **Generate Test Cases** opens. Click **Analyze**: “AI is generating test cases...”.

   “AI generated *n* test cases for this requirement. Select what you want to create.” The AI proposes 1 to 3 end-to-end test cases, each with its **Steps** and **Actions**.
3. **Select and create**

   Tick the test cases you want, or **Select All Test Cases**, and click **Create**.

   “*n* test case(s) created successfully!” and “Automation saved successfully”. The test cases are linked to the sub and stored in [Automate, in a folder](https://docs.smartestqa.ai/en/automate-test-cases.html#folders) named after the sub-requirement.

> **AI: Review generated steps in Automate**
>
> A step the AI did not tie to one of your recorded actions is created as an [AI step](https://docs.smartestqa.ai/en/automate-steps-ai.html). This quick path has no [**Check Coverage**](https://docs.smartestqa.ai/en/analyze-import.html#coverage-check) like the wizard. Open each new test case in Automate, [check its steps](https://docs.smartestqa.ai/en/automate-editor.html#edit-steps) and [run it](https://docs.smartestqa.ai/en/automate-dry-run.html#start-dry-run) before you rely on it.

## How links reach pipelines

- **Requirements in a pipeline.** In **Schedule** a [pipeline can include requirements](https://docs.smartestqa.ai/en/schedule-create.html#add-content). When it runs, each requirement expands into the test cases linked to its sub-requirements, sub by sub, in the stored order.
- **Keeping pipelines in sync.** When a save changes the set of test cases of a requirement that a pipeline uses, the dialog **Update Scheduler Parameters** opens. Tick the pipelines (or **Select All**) and click **Update**: new [parameters](https://docs.smartestqa.ai/en/schedule-settings.html#pipeline-parameters) are added and removed ones deleted. Tick [**Update parameter values from the test case**](https://docs.smartestqa.ai/en/automate-editor.html#sync-pipelines) to overwrite the values too; otherwise “Your scheduler values are kept — only added or removed parameters are synced.”
- **Result.** “*n* scheduler(s) updated. Added: *a*, Deleted: *d*”, or “Scheduler synchronization failed”.
- **[Archiving](https://docs.smartestqa.ai/en/analyze-folders.html#archive)** a requirement removes it from its pipelines, and restoring it does not add it back.

> **Note: Pipelines created by the AI wizard**
>
> When the wizard creates a pipeline, it adds the new test cases to a suite of their own. See [What gets created](https://docs.smartestqa.ai/en/analyze-import.html#what-gets-created).

## What counts as covered

Different screens count coverage differently. All of them count **sub-requirements**, never main requirements.

| Where | A sub-requirement counts when |
| --- | --- |
| [Setup Roadmap › Write test cases](https://docs.smartestqa.ai/en/quick-start-progress.html#roadmap-percent) | It has at least one test case that is not a template |
| [InSight › Test Health › Requirement coverage](https://docs.smartestqa.ai/en/insight-test-health.html#pillars) | A linked scenario checks a result and passed its last run |

Formulas and examples: [Numbers shown elsewhere](https://docs.smartestqa.ai/en/analyze-numbers.html#elsewhere).

Video: [Link test cases and keep pipelines in sync](https://docs.smartestqa.ai/media/videos/ANA-04.mp4) (2:00)

Add, order and remove links, Automate on a sub, and the scheduler sync dialog.

Video transcript: A sub-requirement is one rule. Select it to see its details on the right. Test Cases lists what proves this rule. Nothing is linked yet. Add opens the test cases of the project. Add the cases that check this rule: here, two tests of the reset form. They now show under the sub-requirement, and their results count for it.

## If something goes wrong

- [“Please select a Sub Requirement first.”](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-select-sub)
- [“This test case is already added to the Sub Requirement.”](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-already-added)
- [Automate is greyed out on a sub](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-automate-disabled)
- [“Requirement description is too short”](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-automate-failed)
- [“Scheduler synchronization failed”](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-scheduler-sync)
- [Test Health shows a sub-requirement as not covered](https://docs.smartestqa.ai/en/analyze-troubleshooting.html#fix-coverage-zero)
