1. Docs
  2. Build tests
  3. Analyze
  4. Link test cases

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.

4 min read Updated CustomersAdmins

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 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.
  1. Select the sub-requirement

    Open the main requirement and click the sub in 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.

  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.
  • 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 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 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 named after the sub-requirement.

Review generated steps in Automate

A step the AI did not tie to one of your recorded actions is created as an AI step. This quick path has no Check Coverage like the wizard. Open each new test case in Automate, check its steps and run it before you rely on it.

How links reach pipelines#

  • Requirements in a pipeline. In Schedule a pipeline can include requirements. 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 are added and removed ones deleted. Tick Update parameter values from the test case 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 a requirement removes it from its pipelines, and restoring it does not add it back.

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.

What counts as covered#

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

WhereA sub-requirement counts when
Setup Roadmap › Write test casesIt has at least one test case that is not a template
InSight › Test Health › Requirement coverageA linked scenario checks a result and passed its last run

Formulas and examples: Numbers shown elsewhere.

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.

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

If something goes wrong#

Didn’t find your answer?Write to support with your project name and what you see on screen.

info@smartestqa.ai