test-suite
latest
false
UiPath logo, featuring letters U and I in white
Test Suite User Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Nov 20, 2024

Generate tests for requirements

Generating manual test cases for requirement

With the Generate tests feature, you can create manual test cases directly from your requirements using generative AI. The tool that helps you generate test cases is called AutopilotTM. With the help of AutopilotTM, this feature creates a list of manual test cases by analyzing various requirement details such as name, description, attachments, custom fields, labels, and documents. You can then create test cases from the initial list or provide specific instructions for generating test cases tailored to your exact needs.

Prerequisites

To generate tests for a requirement, your Test Manager role must have the following permissions:

  • Test Case - Create
  • Requirement - Edit

Let's take the example of testing a feature for submitting loan requests in the UiBank Application. Here's how you would use the tool:

Steps

  1. Open a project, and navigate to Requirements.
  2. Create a requirement called Submit loan request, and type a detailed description about it, highlighting the application flow and acceptance criteria. Check the description that you can use for this example:
    Requirement example

    This requirement details how people can apply for a loan in the UiBank Banking Application powered by UiPath®.

    Application Flow
    • The applicant starts the loan application at https://uibank.uipath.com.
    • The applicant clicks the 'Product' button in the header menu.
    • The applicant clicks the 'Loans' button in the dropdown menu.
    • The system redirects to https://uibank.uipath.com/loans.
    • The applicant clicks the 'Apply For a Loan' button.
    • The system redirects to https://uibank.uipath.com/loans/apply.
    • The applicant must fill in the following mandatory fields:
      • Email Address: This field requires an email address in a valid format.
      • Loan Amount: This field accepts only positive integer values.
      • Loan Term: This field provides the options '1', '3', '5', and '10' in years.
      • Yearly income: This field accepts only positive integer values.
      • Age: This field accepts only positive integer values.
    • The applicant then clicks the 'Submit Loan Application' button.
    • The applicant is notified whether the loan application is approved or rejected on the next page.

    Acceptance criteria

    For applicants between 18 and 65 years of age and a loan amount less than 100,000 we approve the loan application with:

    • 'Congrats! You've been approved for a loan with UiBank!'

    For applicants below 18 years of age, we reject the loan application with:

    • 'Sorry, at this time you have not been approved for a loan'

    For applicants between 18 and 65 years of age and a loan amount of more than 100,000 we reject the loan application with:

    • 'Sorry, at this time you have not been approved for a loan'

    For applicants not providing all mandatory fields and then clicking 'Submit Loan Application' button:

    • No error message will be displayed
    • No action will be taken
    • The applicant will remain on the same page
  3. Select More Options for this requirement and choose Generate tests. Alternatively, open the requirement, and then choose Generate tests.

    The Provide Supporting Documents window opens, prompting you for attachments or other documents necessary for generating test cases. The attachments should be tied to the process of submitting loan requests.

  4. In the Provide Supporting Documents window, select the attachments of the requirement. These are used when generating tests. You can also upload other files yourself.


  5. Select Next and provide additional instructions that AutopilotTM should use when generating test cases. Choose from a prompt from the Prompt library or type these instructions in the Provide Additional Guidance window.
    These are some of the instructions that Autopilot can follow:
    • You can instruct AutopilotTM the number of test cases that you want to generate. The maximum number of test cases is 50.
    • You can specify AutopilotTM to cover all user steps and acceptance criteria described in the loan request requirement.
    • You can instruct AutopilotTM to generate pre-conditions.
    • You can specify AutopilotTM to generate an expected result for each test step.


  6. Select Generate tests to initiate the process.

    When the generation finishes, you will receive a Test Case generation completed notification. Depending on your notification preferences, you can receive the notification both in-app and via email.

  7. Select the Test generation completed notification to review the generated test cases.
    1. Expand each test case in the Generate tests panel, and review the generated test cases.


    2. If you are satisfied with their content, select Create tests.

      The generated test cases are also linked with the requirement that was used to generate them.

  8. If you are not satisfied with the generated test cases, select Regenerate, and provide additional details about your use case.
    1. Attach more relevant documents for AutopilotTM to use.
    2. Click Next and type additional details in the Provide instructions text box.

      The Best Practices section for writing instructions at the end of this page provides guidance for creating effective prompts.

    3. After refining the steps, select Regenerate.
    4. Click the Test generation completed notification to access the regenerated test cases.
    5. Expand each test case and review them.
    6. Select the test cases that you are satisfied with, and then select Create tests.

Supported file types

You can only upload the following file extensions, from which Autopilot processes only the text content:

  • DOCX
  • XLSX
  • TXT
  • CSV
  • PNG
  • JPG
  • PDF
  • BPMN
Note: Autopilot processes only the text content in the files. Images within the files are not processed.

Best practices

Visit Best practices for generating tests from requirements to check a comprehensive list of guidelines and examples to help you write effective instructions.

User access management with Autopilot for Testers

The AI Trust Layer governance policy allows you to manage the use of AI-powered features within your organization. Although all members have default access to these features, you can use this policy to restrict access as needed. The AI Trust Layer governance policy empowers you to limit a user's access to certain AI-powered features or all of them, at a user, group, or tenant level. Additionally, it gives you the ability to decide which AI products users can access. You can create, modify, and implement this governance policy in AutomationOps.

If you want to deploy an AI Trust Layer governance policy and still use the AI-powered testing capabilities, ensure that, within the policy's Features Toggle, you select Yes for Enabling Test Manager features.

Check the following resources to learn how to create, configure, and deploy a governance policy for your organization.

Accessing latest test generation results

Access your latest generated test cases in the Requirements page.
  1. Go to Latest Results.
  2. Select Generated test cases.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.