# Requirements Management

{% hint style="info" %}
**Who is this for?** QA engineers, testers, and product managers who want to generate test cases from requirement documents and track coverage gaps automatically.
{% endhint %}

## Overview

The **Requirements Library** is a centralized workspace where you upload requirement files, review AI-generated questionnaires, monitor test case generation, and inspect coverage gaps. Each uploaded file gets a dedicated **Requirements Details** page with six tabs that give you full visibility into how your requirements map to test cases.

***

## Opening the Requirements Library

{% stepper %}
{% step %}

#### Navigate to test development

Open <https://app.contextqa.com> and sign in to your workspace. Select **Test Development** from the left sidebar.
{% endstep %}

{% step %}

#### Open the Requirements Library

Select **Imported Files** from the left sidebar or the **Test Development** sub-navigation. The Requirements Library displays all uploaded requirement files in a searchable, filterable table.
{% endstep %}
{% endstepper %}

***

## Requirements Library table

The table displays one row per uploaded file with the following columns:

| Column             | Description                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------- |
| **Name**           | File name prefixed with a requirement ID (e.g., `REQ-42`). Click the name to open the Requirements Details page. |
| **Type**           | File type — *Requirements* or *Test case* — with a platform icon (Web, Mobile, or API).                          |
| **Status**         | Current processing status displayed as a colored badge.                                                          |
| **Estimated Time** | Time taken to process the file.                                                                                  |
| **Test Cases**     | Number of generated test cases (visible when status is *Completed*).                                             |
| **Created by**     | The user who uploaded the file.                                                                                  |
| **Created Date**   | Date and time of upload.                                                                                         |

**Status values:**

| Status                       | Meaning                                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Completed**                | Processing finished — test cases are ready for review.                                                 |
| **Pending action**           | The AI needs clarification before generating test cases. Click the row to answer the AI questionnaire. |
| **Processing / In progress** | File is being analyzed. You can continue working — ContextQA notifies you when generation completes.   |
| **Failed / Error**           | Processing failed. Check the error details and re-upload if needed.                                    |

**Table features:**

* **Search** — Filter files by name or ID.
* **Filters** — Filter by format, status, date range, or test plan.
* **Auto-refresh** — Automatically reload the table to check for status updates.
* **Upload requirement** button — Start a new upload directly from the library.

***

## Uploading a requirement file

{% stepper %}
{% step %}

#### Click Upload requirement

Click the **Upload requirement** button in the Requirements Library header. The upload dialog opens.
{% endstep %}

{% step %}

#### Select the import mode

Choose between two modes:

| Mode                   | Description                                                                         |
| ---------------------- | ----------------------------------------------------------------------------------- |
| **Import Test Cases**  | Upload an Excel spreadsheet (`.xlsx`, `.xls`) containing test case definitions.     |
| **Import Requirement** | Upload a requirements document or video to generate test cases from specifications. |
| {% endstep %}          |                                                                                     |

{% step %}

#### Select the target platform

| Platform            | Available in                 |
| ------------------- | ---------------------------- |
| **Web Application** | Both modes                   |
| **Mobile**          | Both modes                   |
| **API**             | Import Requirement mode only |
| {% endstep %}       |                              |

{% step %}

#### Upload your file

Drag and drop or click to browse. Accepted file types depend on the mode and platform:

| Mode               | Platform     | Accepted formats                                                                  |
| ------------------ | ------------ | --------------------------------------------------------------------------------- |
| Import Test Cases  | All          | `.xlsx`, `.xls`                                                                   |
| Import Requirement | Web / Mobile | `.xlsx`, `.xls`, `.flv`, `.mov`, `.mpeg`, `.mpg`, `.mp4`, `.webm`, `.wmv`, `.3gp` |
| Import Requirement | API          | `.json`                                                                           |

{% hint style="warning" %}
Video files have a maximum size of **1 GB** and a maximum duration of **30 minutes**.
{% endhint %}
{% endstep %}

{% step %}

#### Select a publish mode

Choose how generated test cases are handled after analysis:

| Mode                           | Description                                                                                                                                                                                                                                                   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Require Approval** (default) | Generated test cases are saved in a pending state. You must manually review and approve them from the Test Cases tab before they are published. The **Create Test Suite**, **Create Test Plan**, and **Execute Test Plan** options are disabled in this mode. |
| **Auto Publish**               | Generated test cases are published immediately after analysis. You can optionally configure test suite, test plan, and execution settings (see next step).                                                                                                    |

{% hint style="info" %}
Publish mode is available in **Import Requirement** mode only. When you select **Require Approval**, use the **Approve All** or **Reject All** buttons on the Test Cases tab to manage generated test cases (see [Test Cases tab](#test-cases-tab)).
{% endhint %}
{% endstep %}

{% step %}

#### Configure optional settings

These options are available when **Auto Publish** is selected as the publish mode:

| Option                | Description                                                                                               |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| **Create Test Suite** | Automatically group generated test cases into a new test suite. Enter a suite name.                       |
| **Create Test Plan**  | Create a test plan for the generated cases. Enter a plan name. Automatically enables test suite creation. |
| **Execute Test Plan** | Run the test plan immediately after generation. Available when **Create Test Plan** is enabled.           |
| {% endstep %}         |                                                                                                           |

{% step %}

#### Start generation

Click **Create Test Cases**. ContextQA uploads the file and begins processing.

* If the AI needs clarification, the **AI questionnaire** opens automatically (see [Answering the AI questionnaire](#answering-the-ai-questionnaire)).
* Otherwise, ContextQA generates test cases in the background. The file appears in the Requirements Library with status *Processing*.
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
When the Figma feature is enabled on your plan, you can select **Figma** as the source instead of uploading a file. Enter a Figma file URL (e.g., `https://www.figma.com/file/...` or `https://www.figma.com/design/...`).
{% endhint %}

***

## Answering the AI questionnaire

When the AI determines that your requirements need clarification, it generates a set of questions. This happens either automatically after upload or when you click a file with **Pending action** status.

The questionnaire dialog displays:

* The file name and the AI's initial analysis message
* One or more clarification questions, each with context explaining why the question is relevant

Type your answer for each question in the provided text area. Then:

* Click **Submit** to send your answers and continue generation.
* Click **Skip & Generate Test Cases** to proceed without answering. This option is available only before you enter any answers.

After submission, a confirmation message appears: *"The requirements are currently being processed. Please review the test cases once they are ready."*

***

## Requirements Details page

Click any file in the Requirements Library to open its **Requirements Details** page. The header displays:

* File name and processing status
* Metadata (file type, test type, requirement code, creator, date)
* Test case count and type badges (Positive, Negative, Edge)
* Actions menu with **View Details**, **Download Original**, **Export Test Cases**, **Re-import / Update**, and **Delete**

Below the header, six tabs provide different views of the requirement.

***

### Test Cases tab

The default tab. Displays all test cases generated from the requirement file in a searchable, filterable table.

**While generation is in progress**, a progress indicator shows:

* Percentage complete and estimated time remaining
* A message confirming that generation runs in the background

**After generation completes**, the table shows each test case with:

* Name and description
* Steps count
* Variables
* Type (Positive, Negative, Edge, Functional, Boundary Value, End to End, Field Validation)
* Status (New or Duplicate)

**Available actions:**

* **Search** test cases by name
* **Filter** by type or status
* **Approve All** or **Reject All** to batch-manage generated test cases
* Click a test case row to open a detail drawer with full step information

**Table row actions:**

* View, edit, or delete individual test cases from the row action menu

***

### Questionnaire tab

Displays the AI-generated questions and your answers from the clarification step.

Each entry shows:

* The question text
* Your answer (or a note that the question was skipped)

Use this tab to review what context the AI used when generating test cases. If a question was skipped, a placeholder indicates: *"Question skipped. Regenerate the test case to add an answer."*

***

### AI Analysis tab

Shows the AI's analysis of your uploaded requirements, organized into four sections:

| Section              | Description                                                                    |
| -------------------- | ------------------------------------------------------------------------------ |
| **AI Understanding** | A summary of how the AI interpreted your requirements document.                |
| **Assumptions Made** | A numbered list of assumptions the AI made during analysis.                    |
| **Coverage Notes**   | Areas covered by the generated tests, with a summary and bullet-point details. |
| **Warnings & Gaps**  | Areas that may need attention — flagged with warning indicators.               |

A **Confidence Score** (0–100%) indicates how confident the AI is in its analysis. Higher scores mean the requirements were clear and complete.

***

### History tab

{% hint style="info" %}
This tab is coming soon. It will display a timeline of changes made to the requirement file, including re-imports, test case modifications, and status transitions.
{% endhint %}

***

### Metadata tab

Displays detailed information about the uploaded file in three sections:

**File information:**

| Field      | Description                                         |
| ---------- | --------------------------------------------------- |
| File Type  | Format of the uploaded file (e.g., XLSX, JSON, MP4) |
| File Size  | Size of the uploaded file                           |
| Page Count | Number of pages in the document                     |
| Word Count | Total word count                                    |
| Version    | Current version number                              |

**Configurations:**

| Field                   | Description                                           |
| ----------------------- | ----------------------------------------------------- |
| Test Plan               | Associated test plan name (if created during upload)  |
| Test Suite              | Associated test suite name (if created during upload) |
| Platform                | Target platform (Web, Mobile, or API)                 |
| Browser / Mobile Device | Target browser or mobile device                       |

**Timestamps:**

| Field         | Description                             |
| ------------- | --------------------------------------- |
| Created By    | User who uploaded the file              |
| Created At    | Upload date and time                    |
| Last Modified | Date and time of the most recent change |

**Labels:** Any tags applied to the requirement file.

***

### Gaps tab

Identifies coverage gaps between your requirements and the generated test cases. The page displays each gap as a card in a two-column grid.

**Each gap card shows:**

* **Title** — A short description of the missing coverage area
* **Similarity score** — How closely the gap relates to existing test cases (displayed as a progress bar)
* **Tags** — Requirement ID, test case priority, test case type, and prerequisite warnings
* **Why missing** — An explanation of why this area lacks coverage

Click **View details** on any gap card to open a detail drawer with:

* **Similarity score** — A visual ring chart with a description of the score level
* **Summary** — Detailed explanation of the gap
* **What's missing** — A numbered list of specific items not covered
* **Suggested test cases** — AI-recommended test cases to close the gap

**Gap drawer actions:**

* **Add** individual suggested test cases to your project
* **Add All Suggestions** to close the gap at once
* **Dismiss** the gap if it is not relevant

***

## Row actions in the Requirements Library

Right-click or use the action menu on any file in the Requirements Library for quick actions:

| Action                 | Description                                              |
| ---------------------- | -------------------------------------------------------- |
| **View Details**       | Open the Requirements Details page                       |
| **Download Original**  | Download the originally uploaded file                    |
| **Export Test Cases**  | Export generated test cases                              |
| **Re-import / Update** | Upload a new version of the requirement file             |
| **Delete**             | Remove the requirement file and its generated test cases |

***

## Related documentation

* [Creating Test Cases](/web-testing/creating-test-cases.md) — All test case creation methods including file import
* [AI Test Generation](/ai-features/ai-test-generation.md) — All 10 AI test generation methods
* [Managing Test Suites](/web-testing/managing-test-suites.md) — Organize test cases into suites
* [Test Data Management](/web-testing/test-data-management.md) — Variables and data-driven testing


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learning.contextqa.com/web-testing/requirements-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
