Tutorial: Generate Tests from Requirements
Upload requirements, answer AI clarifications, review traceable generated test cases, and run the accepted ContextQA coverage without writing test steps.
Quick answer
Upload requirements, answer AI clarifications, review traceable generated test cases, and run the accepted ContextQA coverage without writing test steps. Follow the documented prerequisites and steps, then verify the expected result before using the workflow in a shared or production process.
What this page covers
ContextQA reads a requirements artifact — a specification document, a user story, or a set of acceptance criteria — and generates a complete set of test cases from it. Instead of translating each requirement into steps by hand, you upload the source, answer a few clarifying questions, and review the test cases the AI produces. Every generated case maps back to a requirement, so you can show coverage at a glance.
In this tutorial you:
Start an import from a requirements document
Configure the target platform, publish mode, and suite creation
Let ContextQA analyze the requirements and answer its clarifying questions
Review the generated test cases and approve the ones you want
Run a generated test and confirm it works
End result: A reviewed test suite generated from a requirements document, with each test case traceable to the requirement that produced it — ready to run as part of your regression cycle.
Prerequisites
A ContextQA account with at least one workspace (sign up)
A requirements document to import — a
.pdf,.docx,.xlsx,.csv, or.txtfile describing the behavior you want to testThe URL of the web application the requirements describe
Familiarity with core concepts — specifically test cases, suites, and test plans
If you don't have a requirements document handy, create a plain text file named registration-requirements.txt with the following content and use it throughout this tutorial:
Step 1: Start a requirements import
Begin by opening the test case creation panel and choosing the import path.
In the left sidebar, select Test Cases.
Click the + icon to open the creation panel. A full-height panel slides in from the right.
On the method selection screen, click Import File.
The panel asks What type of file would you like to import? Select the Import Requirements card.
Verify it worked: The panel switches to a stepper with three steps — Inputs, Analysis, and Clarifications — with Inputs active.
Step 2: Configure the import
On the Inputs step, set how ContextQA generates and publishes the test cases before you upload the file.
Click Show Configuration Options to expand the settings.
Under Select Target Platform, choose Web Application.
Under Publish Mode, choose Require Approval. Generated test cases stay in a draft state until you review them, which is the right choice while you learn the workflow.
(Optional) Add context that helps the AI generate more accurate cases:

Name
User registration requirements
Additional information
Web app at https://yourapp.com/register. Email and password are the only required fields.
Upload your requirements file. You can add up to 10 files per import — documents (
.pdf,.docx,.xlsx,.csv,.txt), images, or video recordings.Continue to the next step.
Verify it worked: The stepper advances to Analysis and ContextQA begins reading the document.
Step 3: Review the analysis and answer clarifications
ContextQA reads the document, extracts the testable requirements, and then asks about anything ambiguous.
On the Analysis step, ContextQA lists the requirements it identified from your document. Confirm the list reflects the behavior you want covered.
The flow advances to the Clarifications step. The AI presents follow-up questions about details the document left open — for example, What's the exact wording of the duplicate-email error? or What URL should the registration test start from?
Answer each question in its field. Specific answers produce more accurate tests. If a question doesn't apply, leave it blank.
Submit your answers to start generation. If you have no answers to add, skip the questions instead — generation still runs.
Verify it worked: ContextQA generates a set of test cases covering the requirements and their failure modes. For the registration example, it produces cases for successful registration, the duplicate-email error, and each password validation rule.
Step 4: Review and approve the generated test cases
Generated cases from a requirements import appear under the uploaded file so you can review coverage in one place.
In the left sidebar, go to Assets → Requirements. Your imported file appears in the list with a Status of Completed and a count of generated test cases.
Click the file row to open its detail view. The Test Cases tab lists every generated case.
Review the table. Each row shows:
Test Case
The under-review ID, name, and description. An existing-case icon and linked TC-<id> identify a match already in the repository.
Type
The test type — Positive, Functional, Negative, Edge, Field Validation, End to End, or Boundary Value
Priority / Prerequisite
Triage metadata and any reusable setup case
Variables
Test-data, environment, or global references detected in the generated steps
Decision
Pending, Approved, or Rejected
Click any test case to open the detail drawer and inspect its steps, expected results, and variables.
For each case you want to keep, click Approve. To discard one, click Reject. To send an approved or rejected case back for another look, use Revert to Review.
Verify it worked: The test cases you approved move to an Approved decision and are published to your test case list. Because you chose Require Approval in Step 2, only the cases you approved are published.
Step 5: Run a generated test
Confirm a generated test works against your live application.
Open one of the approved test cases — for example, Registration — successful sign-up.
Review the steps. The AI fills in the starting URL, the form interactions, and the assertions from your requirement and clarification answers. Edit any step whose wording doesn't match your application's exact labels.
Click Run in the top toolbar.
Select an execution environment and start the run.
Verify it worked: The execution viewer shows each step with a real-time pass/fail indicator. When the run finishes, click View Detailed Report to see the step-by-step breakdown, screenshots, and video.
Summary
You generated a test suite from a requirements document in five steps:
Started a requirements import from the test case creation panel
Configured the target platform, publish mode, and context for generation
Reviewed the AI analysis and answered clarifying questions to sharpen the output
Approved the generated test cases, each traceable to the requirement that produced it
Ran a generated test and reviewed the evidence
A specification that existed only as a document is now a reviewed, runnable test suite.
Next steps
Generate from a Jira ticket: If you manage requirements in Jira, the same flow can pull test cases from ticket descriptions and acceptance criteria. See Jira integration and AI test generation.
Close coverage gaps: Use the Gaps tab to find requirements without a test, then add context and regenerate. See Requirements coverage gaps.
Improve accuracy with application context: Add a Knowledge Base so the AI knows your login flow, navigation, and terminology before it generates.
Organize and schedule: Add the approved cases to a suite and schedule them. See Managing test suites and Tutorial: Build and schedule a regression suite.
Run on every change: Trigger the suite from your pipeline. See GitHub Actions or Tutorial: CI/CD with GitHub Actions.
Related pages
AI test generation — every generation source, including requirements, Jira, Figma, OpenAPI, and video
Creating test cases — all four creation methods in the unified panel
Uploaded test files — manage imported files and their generated test cases
Requirements coverage gaps — find and close gaps in generated coverage
Knowledge Base — give the AI application context for more accurate generation
Last updated
Was this helpful?
