Test Suite
latest
false
Banner background image
Test Suite User Guide
Last updated Apr 30, 2024

PREVIEW
AI-powered test generation - Preview

Generating manual test cases for requirement

With the Generate tests feature, you can create manual test cases directly from your requirements using generative AI (Artificial Intelligence). The tool that helps you generate test cases is called AutopilotTM. With the help of AutopilotTM, this feature creates a list of potential test cases by analyzing various requirement details such as name, description, attachments, custom fields, labels, and documents that you manually upload to the Generate tests dialog box. 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 use AI-powered test generation for 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 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. Type these instructions in the Provide Additional Guidance window.

    For instance, you can specify AutopilotTM to cover all user steps and acceptance criteria described in the loan request requirement.



  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 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 Refine tests, 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 tests.
    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.

Best practices for writing instructions

If you wish to fine tune the generated test cases, follow the recommendations below to write effective instructions.

  • Include information that addresses edge cases and exceptions.
  • Focus on aspects regarding the security of the features that you're testing.
  • Ensure that the instructions are clear, specific, and unambiguous.
  • The instructions should include essential information, such as the feature to be tested, any specific conditions, and the expected outcome.
  • Write instructions that encourage action.
  • Create instructions that cover both simple and more complex scenarios.

User access management for AI-powered testing

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.