🔍 AI Test Case Generator

How It Works

🎯 Purpose

The AI Test Case Generator is designed to help QA teams and software testers automatically generate comprehensive, well-structured test cases from user stories. Whether you're working with JIRA tickets or manually entered user stories, this tool leverages advanced AI/LLM technology to create detailed test cases that cover:

  • Functional Testing: Core functionality, business logic, and user workflows
  • Performance Testing: Response times, load handling, and system performance
  • Security Testing: Data encryption, authentication, and vulnerability testing
  • UI/UX Testing: Responsiveness, design consistency, and user interface validation
  • Edge Cases & Boundary Conditions: Comprehensive coverage of all scenarios

The tool aims to achieve ~90% coverage of user story requirements, ensuring no critical test scenarios are missed.

⚙️ How It Works

Step 1: Choose Your Input Method

You have two options to provide user stories:

  • Manual Input: Enter a User Story ID and the complete user story description directly into the form
  • JIRA Integration: Fetch user stories directly from your JIRA instance by providing JIRA links, email, and API token

Step 2: Configure LLM Provider & Prompt

Select your preferred AI/LLM provider:

  • OpenAI: Use OpenAI's GPT models (requires API key)
  • Gemini: Use Google's Gemini models (requires API key)
  • Ollama (Local): Use a local LLM via Ollama (no API key required)

Prompt Configuration: Choose how test cases are generated:

  • Auto: Default comprehensive prompt for broad coverage
  • Prompt2:/li>
  • Input prompt: Use your own custom prompt; the tool appends a standard output format. Hardcoded UI/Performance cases are not added when using a custom prompt.

Getting Your API Keys

To use OpenAI or Gemini, you'll need to obtain an API key from the respective provider:

  • OpenAI API Key:
    • Visit https://platform.openai.com/api-keys
    • Sign in to your OpenAI account (or create one if you don't have it)
    • Click "Create new secret key"
    • Copy the API key (it starts with "sk-")
    • Paste it into the API Key field in the tool
  • Gemini API Key:
    • Visit https://aistudio.google.com/app/api-keys
    • Sign in with your Google account
    • Click "Create API Key"
    • Select or create a Google Cloud project
    • Copy the generated API key
    • Paste it into the API Key field in the tool

Note: API keys are sensitive credentials. Never share them publicly or commit them to version control. The tool does not store your API keys - they are only used for the current session.

Step 3: Set Application Type

Specify the type of application you're testing:

  • Web: Web applications with browser-based testing
  • Mobile: Mobile applications (iOS/Android)
  • Dashboard: Dashboard applications (Power BI, etc.)

Step 4: Generate Test Cases

Depending on your prompt choice, the AI analyzes your user story:

  • Auto: Broad coverage with functional, performance, security, and UI focus
  • Prompt2: Structured Five-Lens Method:
    1. Business Lens: Business rules, workflows, acceptance criteria
    2. User Lens: User experience, typical mistakes, accessibility
    3. Data Lens: Data validation, boundary conditions, edge cases
    4. Technical Lens: API testing, error handling, system integration
    5. Risk Lens: Security, performance risks, data integrity
  • Input prompt: Your custom instructions plus a standard output format; no hardcoded UI/Performance cases are added

Step 5: Review and Export

Once generated, you can:

  • Review and edit test cases directly in the browser
  • Check coverage analysis to identify missing test scenarios
  • Add missing test cases from coverage analysis to your main list
  • Download test cases as Excel or CSV files
  • Export to TestRail or Zephyr Scale for seamless integration with your test management workflow

🚀 TestRail Export

The tool provides seamless integration with TestRail, allowing you to export generated test cases directly to your TestRail instance with organized folder structures.

Features

  • Automatic Folder Structure: Test cases are organized in a hierarchical structure:
    • Application Type Folder (Web/Mobile/Dashboard)
    • User Story Folder (based on your story ID)
    • Test Cases (organized within the story folder)
  • Smart Test Case Mapping: Test case labels are automatically mapped to TestRail types:
    • Functional → Functional Test Case
    • Performance → Performance Test Case
    • Security → Security Test Case
    • UI → UI Test Case
  • Complete Test Case Information: All test case details are preserved:
    • Description (as TestRail title)
    • Precondition
    • Steps (numbered and detailed)
    • Expected Result
    • Test Type and Priority
  • Section Management: Automatically creates sections if they don't exist, or uses existing sections if they're already present
  • Bulk Export: Export multiple user stories and their test cases in a single operation

How to Export to TestRail

  1. Generate Test Cases: First, generate test cases using the main generator
  2. Configure TestRail Settings: Provide your TestRail credentials:
    • TestRail Domain URL (e.g., https://yourcompany.testrail.io)
    • TestRail Email/Username
    • TestRail API Key (found in TestRail: My Settings → API)
    • Project ID or Project Name
  3. Export: Click the "Export to TestRail" button to automatically create the folder structure and upload all test cases
  4. Verify: Check your TestRail instance to see the organized test cases

TestRail Requirements

  • TestRail API must be enabled (Admin → Site Settings → API)
  • Your account must have API access permissions
  • You need appropriate permissions to create sections and test cases in the target project
  • TestRail domain URL should be in the format: https://yourcompany.testrail.io
💡 Tip: The tool automatically handles folder creation and organization. If a folder structure already exists, it will use the existing folders and add test cases to them.

🦎 Zephyr Scale Export

The tool integrates with Zephyr Scale (for Jira), allowing you to push generated test cases directly to your Zephyr project with folder support.

Features

  • Folder Options:
    • No folder selected: A new root-level folder is created with the user story ID as the name; all test cases are posted inside it.
    • Folder selected: A new subfolder (named with the story ID) is created inside the selected folder (e.g. under "LAMP Support"); test cases are posted in that subfolder.
  • Custom Fields: The tool discovers your project's required custom fields (e.g. Expected Result, Steps) and maps generated test case data accordingly.
  • Complete Test Case Data: Description, precondition, steps, expected result, labels, and custom fields are sent to Zephyr.
  • Progress Feedback: Connection successful, folder creation/selection, and per-test-case progress (e.g. "Testcase 1... added") are shown in the push dialog.

How to Push to Zephyr Scale

  1. Generate Test Cases: Generate test cases using the main generator
  2. Choose Integration: In Export, select Zephyr Scale (instead of TestRail)
  3. Manage Connection: Provide your Zephyr settings:
    • API region (e.g. https://api.zephyrscale.smartbear.com/v2)
    • Zephyr API token (from Jira: Zephyr Scale → API Keys)
    • Jira project key (e.g. LAMP)
    • Optional: Jira URL for the "Open Zephyr" link after push
  4. Load Folders (optional): Click "Load folders" to see your project's folder hierarchy. Select a folder if you want test cases inside it; leave unselected to create a new root-level folder named with the story ID.
  5. Push: Click "Push to Zephyr" to create the folder (if needed) and upload all test cases
  6. Verify: Use "Open Zephyr" or open your Jira Zephyr Scale view to see the test cases

Zephyr Requirements

  • Zephyr Scale (for Jira) must be installed and configured in your Jira project
  • You need a Zephyr API token (Jira profile → Zephyr Scale → API Keys)
  • Project key must match your Jira project
  • Root-level folder creation uses only name, projectKey, and folderType (no parentId)
💡 Tip: If you don't select a folder, a new folder at root level is created with the user story ID (e.g. TIS-123) and all test cases are placed inside it. If you select an existing folder (e.g. LAMP Support), a subfolder with the story ID is created under it and test cases are placed there.

💡 How It Helps QA

Time Savings

Manually writing comprehensive test cases can take hours or even days. This tool generates detailed test cases in minutes, allowing QA teams to focus on execution and analysis rather than documentation.

Comprehensive Coverage

The Five-Lens Method ensures that test cases cover all aspects of the user story, including:

  • Happy path scenarios
  • Negative test cases and error handling
  • Boundary value testing
  • Security and performance considerations
  • Edge cases that might be overlooked

Consistency

All generated test cases follow a standardized format with clear sections for:

  • Description
  • Precondition
  • Steps (numbered and detailed)
  • Expected Result
  • Test Label (Functional, Performance, Security, UI, etc.)

Coverage Analysis

The built-in coverage analysis feature helps you:

  • Identify gaps in test coverage
  • Discover missing test scenarios
  • Add suggested test cases directly to your list
  • Track coverage percentages across different lenses

Flexibility

The tool supports multiple workflows:

  • Work with JIRA tickets directly
  • Use manual input for stories not in JIRA
  • Choose from multiple AI providers (OpenAI, Gemini, Ollama) and prompt modes (Auto, Prompt2, Custom)
  • Export to Excel or CSV, or push directly to TestRail or Zephyr Scale

Quality Assurance

By ensuring ~90% coverage of user story requirements, the tool helps QA teams:

  • Catch bugs early in the development cycle
  • Reduce the risk of missing critical test scenarios
  • Improve overall software quality
  • Maintain comprehensive test documentation