Skip to main content

Test Cases

Test Cases define the specific conditions and steps to verify that your application works correctly. TestFlair generates test cases from your user stories.

What Are Test Cases?​

A test case is a set of conditions or variables used to determine whether a system behaves as expected. Each test case includes:

  • Preconditions — What must be true before testing
  • Test Steps — Actions to perform
  • Expected Results — What should happen

Generating Test Cases​

After your user stories are ready:

  1. Navigate to the Test Cases tab in your project
  2. Click Generate Test Cases
  3. Wait for the AI to create test cases from your user stories
  4. Review the generated test cases

Generate test cases

Test Case Structure​

Each generated test case contains:

Header Information​

  • Test Case ID — Unique identifier (e.g., TC-1)
  • Title — Description of what the test verifies
  • Type — Positive, Negative, or Edge (see below)
  • Status — Current execution status
  • Linked User Story — The user story this test case covers

Test Case Type​

Every test case has a type that signals what it verifies. The type is shown as a colored badge in the test case header — click it in create/edit mode to change it:

TypeIndicatorVerifies
PositivegreenThe expected, happy-path behavior
NegativeredError handling and invalid inputs
EdgegrayBoundary and corner cases

New test cases default to Positive. The type is used for categorization and filtering, and it guides how TestFlair generates the corresponding test script.

Test Steps​

Numbered steps to execute:

StepActionExpected Result
1Navigate to login pageLogin form is displayed
2Enter valid usernameUsername is accepted
3Enter valid passwordPassword is masked
4Click "Login" buttonUser is logged in and redirected to dashboard

Sample Generated Test Case​

Here is an example of what the AI generates from a user story about password reset:

TC-1: Verify password reset with valid email

Preconditions: User has a registered account with email [email protected]

StepActionExpected Result
1Navigate to the login pageLogin form is displayed with a "Forgot Password" link
2Click the "Forgot Password" linkPassword reset form is displayed
3Enter "[email protected]" in the email fieldEmail is accepted
4Click "Send Reset Link"Success message confirms a reset email has been sent

Filtering Test Cases​

The test cases list provides several filtering options:

Test case filters

Quick Filters​

  • Search — Type in the Search by TestCase Id or Name… box to filter instantly; a suggestions dropdown shows matching cases by code and name.
  • Status dropdown — Filter by: All, Not Executed, In Progress, Passed, Failed, Blocked. Each option carries a colored dot.
  • Status count chips — Chips under the toolbar show live counts per status (All, Not Executed, In Progress, Passed, Failed, Blocked); click one to filter to that status.

Advanced Filter Drawer​

Click the filter icon to open the advanced filter drawer with:

  • Status — Multi-select checkboxes for multiple statuses
  • User Stories — Filter by linked user story
  • Features — Filter by feature (filtered by selected user stories)

Test Case Statuses​

StatusDescription
Not ExecutedTest hasn't been run yet
In ProgressCurrently being executed
PassedAll steps verified successfully
FailedOne or more steps failed
BlockedCannot execute due to a dependency

Managing Test Cases​

Editing a Test Case​

  1. Click on a test case row to open it in the detail drawer
  2. Modify any field (title, steps, expected results)
  3. Save changes

Edit test case

Creating a Test Case Manually​

  1. Click Create Test Case
  2. Enter the title and description
  3. Add preconditions
  4. Define test steps and expected results
  5. Optionally link to a user story
  6. Save

Bulk Operations​

Select multiple test cases using the checkboxes to perform bulk actions:

  • Bulk Status Change — Update the status of all selected test cases at once
  • Bulk Delete — Remove multiple test cases
  • Export to Excel — Export selected test cases to an Excel spreadsheet

Bulk operations

Linking Bugs​

You can create or link bugs directly from a test case:

  1. Open a test case
  2. Click Create Bug to open the bug drawer
  3. Fill in the bug details — the test case link is pre-populated
  4. Save the bug

This links the bug to the test case for traceability. See Bugs for more on bug management.

Troubleshooting​

Not enough test cases generated?

  • Add more detail to your user stories
  • Improve acceptance criteria

Missing scenarios?

  • Add test cases manually to cover gaps
  • Improve your user stories and regenerate

Next Steps​

With test cases ready:

  • Test Data — Define the input values your steps use
  • Test Scripts — Generate executable automation scripts
  • Bugs — Track bugs linked to test cases
  • Collaboration — Comment on a test case and @mention your team