Generate Test Cases from Requirement or Test Case Module

Introduction

QMetry offers AI-powered test case generation. Testers can generate test cases from a requirement or test case description with a single click. They can manually edit, rearrange, accept, or decline the AI-generated test cases as needed.

Auto-Generate Test Cases (AGT) supports automated test case creation from the following modules:

  • Requirements Module: Generate test cases based on requirement descriptions.

  • Test Case Module: Create test cases by selecting a requirement, entering a description, or using an existing test case.

Prerequisites

  • Super Admin Configurations: The super admin must turn on the Enable users to generate test cases from Requirements or Test Case Module toggle from Customization under General Settings and Audit under QI Configuration (Default: Disabled).

  • The user must have permissions to create test cases.

Auto-Generating Test Cases

Use Intelligence to automatically generate test cases from the Requirement or Test Case module. Testers can review, modify, and finalize these AI-generated test cases to ensure comprehensive test coverage.

From the Requirement Module

With QI, you can author test cases related to a specific requirement. By analyzing the requirement description, QI auto-generates relevant test cases to ensure thorough coverage and alignment with project needs.

Screenshot displaying the Generate Test Cases and Test Steps using QI interface, with highlighted elements including the QI-generated test case list, “Generated by QI” badge, Accept/Decline buttons, and the Create Test Cases button.

To auto-generate test cases from the requirement module, perform the following steps:

  1. Click the requirement entity key to open the requirement detail screen.

  2. Click the Generate Test Cases button in the top right corner.

  3. On the Generate Test Cases using QI pop-up, QI initiates the test case creation process.

  4. Review the generated test cases.

  5. You can modify the test cases by clicking the cog icon (a detailed explanation is available in the following sections).

  6. After review, you can approve or decline the test cases as needed.

  7. Finalize and click the Create Test Cases button to add the approved test cases.

From Test Case Module

You can also auto-generate test cases from the test case module using QI.

The module offers three distinct approaches for generating test cases, ensuring flexibility tailored to specific testing needs. These approaches enable testers to auto-generate test cases from existing requirements, manually entered descriptions, or existing test cases.

Screenshot showing the Test Case module with the “Generate Test Cases” button highlighted. At the bottom of the panel, a button to finalize generation is also highlighted.

To auto-generate test cases from the test case module, perform the following steps:

  1. Navigate to the Test Cases module and click Generate Test Cases.

  2. In the Generate Test Cases using QI pop-up, select one of the following tabs:

    1. Select Requirement

    2. Enter Description

    3. From an Existing Test Case

  3. Click the Generate Test Cases button.

Selecting a Requirement

You can auto-generate test cases using QI from an existing requirement. You can select one from either the current project or another project.

To auto-generate test cases by selecting a requirement, perform the following steps:

  1. In the Generate Test Cases and Test Steps using QI pop-up, navigate to the Select Requirement tab (default tab).

  2. Choose the project from the Project drop-down. The current project is selected by default, but you can switch to another as needed.

  3. The grid displays all existing requirements for the selected project.

  4. Select the required requirement and click Generate Test Cases to proceed.

By Entering a Description

Instead of manually authoring test cases, you can leverage QI’s assistance to auto-generate test cases based on a specific description. QI analyzes the provided description to create test cases, allowing you to review, modify, and use them as needed.

Screenshot of the Enter Description tab where users type a requirement description and expected outcomes. The description entry box is highlighted.

To auto-generate test cases from a user-entered description, perform the following steps:

  1. In the Generate Test Cases and Test Steps using QI pop-up, navigate to the Enter Description tab.

  2. Enter a detailed description (30 to 1500 words), including prerequisites, input data, and expected outcomes.

  3. Once the details are filled in, click the Generate Test Cases button.

To generate accurate test cases, ensure that your description includes sufficient details along with the acceptance criteria. This helps QI analyze the context and identify relevant test scenarios.

From an Existing Test Case

You can use QI to generate or modify the steps for an existing test case. Select the existing test case and provide a description citing the required changes.

To auto-generate test cases from existing test cases, perform the following steps:

  1. Go to the From an Existing Test Case tab.

  2. Select the project from the drop-down. By default, the current project is selected; you can switch to a different project from the project list.

  3. Select the test case that you want to use as a reference.

  4. Enter a description specifying the detailed instructions for modification.

  5. Click on the Generate Test Cases button.

Test Case Processing in QI

QI helps in generating and modifying test cases based on the provided descriptions. If the Generate Test Cases button is disabled or you are getting 1f6ab.png, here is how you can proceed:

  • Ensure a relevant test case is selected for QI to reference.

  • Ensure to enter a description between 5 and 100 words for better accuracy.

  • Ensure the selected test case has sufficient steps to generate a new test case.

Best Practices for Writing User Description:

  • Give clear instructions for enhancing test steps.

  • Write each instruction on a new line for multiline descriptions.

  • Use complete sentences with proper punctuation.

  • Start with action verbs like 'Add', 'Update', 'Change', or 'Remove'.

  • Specify the entity you want QI to modify, such as description, precondition, or steps.

Note

  • Currently, rich text and tables are not supported in test cases for QI processing.

  • Content may lose formatting after the model processes it.

  • AI treats shared steps as steps of a simple test case.

  • Metadata regarding shared steps is not retained by AI.

  • Currently, the word limit for a test case (including description, precondition, and step details) is 1500 words.

Reviewing Auto-Generated Test Cases

After clicking the Generate Test Cases button (whether from the requirement module or test case module), the Generate Test Cases and Test Steps using the QI screen will appear. You can review, edit, approve, and decline the steps as well as the details of each autogenerated test case.

For generating test cases or steps from requirements or user-entered descriptions, this screen has three panels:

Panel

Description

Top Panel

Displays the description from which the test cases are generated. Expand this section to view the full description.

Left Panel

Lists the QI-generated test cases and the total count of test cases created.

Right Panel

Displays the test steps and details associated with a specific test case.

For generating test cases and test steps from an existing test case, this screen has two panels:

  • The top panel displays the entered description and the referenced test case.

  • The bottom panel allows editing of test case steps or details as needed.

You can approve or decline individual test cases by clicking the Accept or Decline button.

Screenshot of a QI-generated test case showing the Accept and Decline buttons used to approve or reject the automatically generated test case.

Editing QI Generated Steps

The Steps panel displays the test case description at the top, followed by the step description, expected outcome, input data, and other UDFs. You can edit the test steps, add or delete steps, insert shareable test cases, and reorder or duplicate steps.

You can also refine the content in the test case description, step descriptions, and expected outcomes as needed.

Screenshot of the Steps tab for a QI-generated test case, showing editable step rows and an action menu with options such as insert row, remove row, duplicate, and move.

You can manually edit AI-generated test steps with the following operations:

Operations

Descriptions

Insert Row

Manually insert an additional test step into the AI-generated test case.

Insert Shareable Test Case

Integrate a shareable test case as a test step within the AI-generated test case.

Remove Step

Delete unnecessary or redundant test steps.

Duplicate Step

Create a copy of a test step for reuse.

Move

Reorder test steps to ensure logical organization.

Edit Text

Modify the test case description, step description, expected outcome, or other fields as needed.

Accept or Decline

Accept or decline a test case based on its relevance. Provide feedback to refine future test case generation. (This option is available only when you generate the test case/steps by selecting a requirement or entering a description.)

Reviewing or Editing QI-generated Test Case Details

The Details tab allows you to set values for both system-defined and user-defined fields.

For test cases generated from a requirement or user-provided description, the Copy Fields to All Generated Test Cases feature allows updating details across all test cases.

Screenshot of the “Select folder for Test Cases” step showing system fields, user-defined fields, and the option “Copy Fields To All Generated Test Cases.” The Details tab is highlighted.

Sharing Feedback on Auto-Generated Test Cases

To provide feedback on QI, click the Thumbs Up or Thumbs Down button. A pop-up will appear with predefined options, allowing you to choose or submit custom feedback. This helps improve the model's accuracy and performance.

Screenshot of the QI-generated test case preview with feedback options highlighted, including positive and negative categories such as contextual accuracy, insufficient detail, or incomplete coverage

If you want to submit feedback that differs from the predefined options, click Others and enter your customized feedback.

Approving or Declining Auto-Generated Test Cases

Users can accept or reject the AI-generated test cases:

  • Accept: All test cases are accepted by default. To accept a previously declined test case, select the test case and click the Accept button.

  • Decline: Users can easily decline redundant or irrelevant test cases by selecting the test case and clicking on the decline button. The declined test cases will be excluded from the final set of test cases.

Users can also change the approved or declined status of a test case by directly clicking on the icons on the left panel.

Creating Auto-Generated Test Cases

After editing the test cases and adding relevant details, ensure that accepted test cases are marked as Accepted and rejected test cases are marked as Declined. Users can review these statuses on the left panel. Once the final set of accepted test cases is prepared, click the Create Test Case button.

Upon successful creation of the test cases, the following screen will appear, providing detailed statistics on the utilization of QI.

The QI-generated test cases are added to the test case module and can be viewed in the test case list view screen. Users can further edit the test case details and steps from the test case module after they have been created.

Screenshot of the QI Test Case Generator statistics panel showing totals for test cases created, updated, and approximate time saved for the session, user, and project.

Default Folder for QI-Generated Tests

By default, all QI-generated test cases are saved in the QI Generated folder. However, you can change the folder location by editing the test case from the Test Case Detail section.

Viewing QI Statistics

Statistics related to the use of the AGT feature can be viewed by hovering over the Generate Test Case button in the Requirement Module or Test Case Module.

Filtering QI Generated Test Cases in Test Case Grid

QMetry provides efficient filtering options for AI-generated test cases. Testers can easily identify AI-generated test cases by applying the Show QI Generated filter.

Screenshot of the Test Cases grid in QMetry with the filter panel open. The “Show QI Generated” checkbox is selected to display only test cases created by QI.
Publication date: