Step-by-step illustration of UiPath Test Suite

uipath-test-suite

With the following simple steps, you can generate a test case for data-driven testing of the existing RPA workflow. Discover the ease of creating and tracking automated tests.

  1. Create test case

Right-click on the RPA workflow to create a test case.

Fig1-create-test-case-from-existing-RPA-workflow

2. Select test case framework

For your scenario, you'll choose a test-case-based BDD framework. UiPath offers a test BDD framework feature, which is generally a best practice to use depending on the use case. Given-When-Then syntax simplifies the creation of automated tests by using natural language. It consists of three parts—Given (initial state), When (action), and Then (expected outcome). This framework allows users to create automated tests in a BDD approach, which is easily understandable by both technical and non-technical team members.

Fig2-key-in-required-test-case-details-based-on-the-nature-of-use-case

3. Select test data source

For our data-driven test case scenario, we used the pre-filled test data excel file as our test data source.

Fig3-select-the-test-data-source

Fig4-test-data-source-pre-filled-test-data-excel-file

With UiPath testing activities, it is possible to generate a range of randomized test data at any given moment, making it particularly useful in regression testing scenarios that require various types of test data. Alternatively, you can generate the Test Data Synthetically using the UiPath Testing Activities, which can be used to generate a list of person names, address (format specific to country), date, number, and many more.

To use this feature, you just need to drag and drop required Test Data activities in workspace as shown below and configure as per your requirement. In the following example, we configured Generate Postal Code within limit of 100000–999999 and created a queue item that can be used for test case with Test Data queue source.

Fig5-generate-synthetic-test-data

In UiPath Orchestrator, you can see the synthetic test data created under the queue Items section.

Fig6-visualise-queue-test-data-on-orchestrator

4. Verify use case conditions

In our scenario, we need to confirm if the Loan Application submitted is successful or rejected. For that we've used UiPath Testing activities in Then section with TakeScreenshots feature when the test case verification failed and succeed. The testing activities offer a range of customizable options that are easy to configure according to specific requirements. Among these options, it's possible to choose when to include UI screenshots and Output Messages in Testing logs, which users can view.

This feature can be adjusted to suit individual needs and preferences, providing a more personalized testing experience. With the ability to easily configure these options, users can optimize their testing processes and guarantee that their applications are thoroughly tested for maximum functionality and performance.

Fig7-verification-testing-activities-in-test-case-workflow

5. Link to UiPath Test Manager

  • This step is required to link the test case with the Test Manger. Test Manager is a web application hosted by Test Management Hub that allows you to manage your testing process. It covers the following functional areas:

  • Linking automated test cases in UiPath Studio to manual test cases in Test Manager assigning test cases to requirements

  • Reporting and dashboards to get a quick overview of your test results

  • Manual testing

  • Creating defects directly from test results

  • Add documentation to manual test cases with UiPath Task Capture

Fig8-link-to-test-manager

Fig9-key-in-test-manager-URL

6. Create test set

Once the test case is created and published in UiPath Studio, you can see it in UiPath Orchestrator. There you may either create a new test set or add the test case to an existing test set. Later, user can link the test set in Test Manager for execution. A test set can hold multiple test cases of a related scenario and will be required to execute the test cases.

Fig10-link-test-set-with-Test-Manager

7. Execute test case

User may execute the test case either manually or automated. There are three ways to run the automated test cases.

  • Test Manager

Fig11-execute-test-set-via-Test-Manager
  • Orchestrator schedule

Fig12-orchestrator-schedule
  • Continuous integration/continuous deployment (CI/CD): Most preferred way when it comes to agile software development i.e., the execution of test set is part of built process.

Continuous integration is a major component in the DevOps lifecycle. It makes the development, testing, and deployment of applications easier and faster. There are several integration tools like Jenkins, Bamboo, Apache Gump, Buildbot, and Travis CI. Among them, Jenkins is the most popular continuous integration tool. Jenkins enables continuous development, testing, and deployment of newly created code.

For instance, we integrated Jenkins with UiPath using UiPath Jenkins Plugin, which allows us to integrate RPA development and software testing. This plugin is available on UiPath Marketplace.

Fig13-UiPath-CI-CD-Architecture

Fig14-UiPath-Jenkins-plugin-configuration-1

Fig15-UiPath-Jenkins-plugin-configuration-2

8. Monitor test case results

Test case results can be monitored from the dashboard in Test Manager. The dashboard provides real-time status updates on the progress of test execution, allowing users to identify and resolve issues quickly. Additionally, it offers extensive reporting capabilities, including graphical representations of test results, to provide users with insights into test coverage and performance. With UiPath Test Manager dashboard, users can streamline their test management process, improve collaboration, and ensure the quality of their automation projects.

Fig16-Test-Manager-Dashboard

Users may also verify‌ activity coverage to check whether their test cases have been covered or not and look for redundancies. The test execution coverage can be seen in the Test Manager Activity Coverage Section and Studio Test Explorer, in the Activity Coverage panel. The coverage calculations are done by the Robot.

Fig17-Test-Manager-Activity-Coverage

Fig18-Studio-Activity-Coverage

In Test Manager, users can view screenshots in the logs of failed/passed test cases. These screenshots provide visual context for the test failure, making it easier for users to understand the cause of the failure and identify potential issues. Users can view the screenshots directly within the Test Manager dashboard, without needing to access the machine where the test was executed.

This feature allows for quicker identification and resolution of issues, improving the efficiency and effectiveness of the test management process.

Fig19-test-case-logs-with-screenshots

When reviewing test results, users can effortlessly generate reports with the execution log and send them to an external management system. They can synchronize execution results with external tools by integrating with the Application Lifecycle Management tool.

Any information collected during the execution process, such as results, logs, timestamps, and other pertinent details, is then synchronized with the tool that's been integrated with Test Manager.

Fig20-create-defect-for-failed-test-cases

9. UiPath test case version control

Integrating UiPath with version control, such as GitHub, brings several benefits, including streamlined version control, enhanced collaboration with team members, and a centralized location for storing workflow projects. With the GitHub integration in UiPath, you can easily manage version control tasks such as committing changes to your local repository, pushing changes to the remote repository on GitHub, pulling changes from the remote repository, and merging changes from different branches.

Additionally, this integration allows for better collaboration with team members, as multiple users can work on the same project simultaneously and track changes made by others. Overall, the integration of UiPath with version control provides a more efficient and effective way of managing your workflow projects.

Fig21-view-test-case-version-history

Fig22-track-code-change-history-with-Version-Control

Overall, the UiPath Test Suite is a powerful set of tools that can help you automate your testing processes. It has the ability to integrate with test management and application lifecycle management tools, and guarantees that your automation project runs smoothly. It provides a comprehensive set of features that can help you create, execute, and manage your tests within UiPath Studio, and it's designed to work seamlessly with UiPath Business Automation Platform.

Priyank Rastogi
Priyank Rastogi

Technology Manager, SimplifyNext