Auto-Generate Test Cases and Steps Using QI

Introduction

's Auto-Generate Test Cases and Test Steps (AGT) feature uses AI to automate test case creation from the Requirement module or the Test Case module. It accelerates test case authoring, reduces manual effort, and allows testers to focus on test execution and validation.

This AI-powered feature enables testers to

  • Create new test cases

  • Generate test case description

  • Write pre-condition

  • Generate test steps and details in existing test cases.

After generation, testers can review and modify the details as needed. You can either update the current version of the test case or create a new version of the test case.

How Does the QI Model Work?

The QI model extracts relevant context from the requirement description or user-provided descriptions to generate modular test cases with comprehensive coverage. Testers can review, modify, and approve or reject the generated test cases before they are added to the test case library.

Note

Best Practices for Generating Accurate Test Cases

To ensure QI generates test cases with higher accuracy, the requirement description should adhere to the following guidelines:

  • Structured Use Case Format: The requirement description must be presented in a well-structured use case format to facilitate accurate test case generation.

  • Acceptance Criteria: Include clear acceptance criteria that define the expected behavior of the feature. Decomposing stories into detailed criteria will improve the accuracy of the generated test cases.

  • Contextual Analysis: Providing these details allows QI to analyze the context effectively and accurately identify relevant test scenarios.

  • Description Length: Descriptions should be between 30 and 1500 words.

  • Description Details: Description shall provide sufficient detail for QI to analyze requirements, identify critical scenarios, and generate accurate test cases.

  • Linking: Test cases generated are automatically linked to their corresponding requirements.

How to Enable or Disable Auto-Generation of Test Cases?

To activate AGT, the super admin must enable it for the instance in Customization.

Go to Customization. Select General Settings & Audit. Click the AI Configurations tab.

Note

  • Only a super admin can access and configure Intelligence Configuration.

  • The default setting for the QI feature is disabled.

Screenshot of QMetry AI Configurations page showing two toggles that enable users to generate test cases from requirements or update test cases with QI. The “View Statistics” link is highlighted.

After enabling this feature, refer to the following documents for guidance:

View Statistics

Admins can monitor the use of AI features for generating and updating test cases across various projects. Key details include:

  • Test case created using QI

  • Test cases updated/versioned using QI

  • Approximate time saving

  • Users using the AGT feature

  • Projects using the AGT feature

Project Settings for Auto-Generation of Test Cases and Steps

Once enabled by the super admin, the project admin can configure this feature at the project level for internal requirements or imported requirements from Jira, Azure, or Rally.

  • For Internal Requirements: QI auto-generates Test Cases based on the requirement description.

    Screenshot of Project → Project/Release/Cycle settings showing configuration options for QI auto generation, including the dropdown to choose the field used for storing pre-conditions (Description or Pre_condition).

    By default, the Description field is set as a precondition for auto-generated test cases. The QI model will refer to the requirement description (if the requirement is selected) or the user-entered description (if the user chooses to manually enter a description).

  • For External Requirements imported from Jira, Azure, or Rally: Projects integrated with external trackers like Jira & sync stories in , project admins can configure up to two issue fields as input descriptions to generate test cases. Example – Description, Business Rules, or Acceptance Criteria.

    Go to Project Management. Select Integration. Click Requirements. Next, select Configurations.

    Screenshot of the Integration → Jira Fields Configuration page showing selectable Jira fields and the “Auto Gen Test Cases QI” column. The Description field and automation configuration options are highlighted.

    Users can configure the other field from the Manage Fields option available under Customization.

    Screenshot of the QMetry Manage Fields section showing a list of user-defined fields, including Pre_condition. The navigation path and the New button are highlighted.

Error Messages

Warning

  • The description will be utilized to generate Test Cases. To produce high-quality Test Cases, the Jira requirement description should consist of a minimum of 30 words and a maximum of 1500 words.

Screenshot of a QMetry requirement page showing an error banner stating that the Jira requirement description must contain 30–1500 words. The Description field is highlighted.

Solution

Add a valid description with a word count ranging between 30 and 1500 words.

Warning

Missing fields. One or more required fields are empty or contain invalid data.

Screenshot of a QMetry QI-generated test case showing a validation error banner: “Missing fields: One or more required fields are empty or contain invalid data.” The empty Pre_condition user-defined field is highlighted.

Solution

If any user-defined fields are marked as mandatory (*), the user must provide valid data. Resolve this error by entering the required information or by changing the mandatory status of the field from Customization.

Go to Customization, select Manage Labels.

Screenshot of the QMetry Manage Fields page showing the Edit view for a user-defined field named Pre_condition. The Field Label, Field Type, and mandatory toggle for the Test Case module are highlighted.
Publication date: