In the world of software, the testing phase is an essential part of the development cycle. Representing up to 40% of the total cost of a project, testing is often time-consuming and requires specific and consistent vigilance on the part of teams.
New and widely-adopted methods, such as Lean, Agile and DevOps, allow development teams to increase the frequency of delivering new versions of applications. According to the “2019 Continuous Testing Report”, 58% of businesses already roll them out daily, and testing has become a bottleneck. Automation therefore is becoming a prerequisite for guaranteeing high-quality software.
Using Robotic Process Automation (RPA) for your functional testing
Historically, development teams have automated the most technical tests, such as unit tests and integration tests. Automation of functional testing, especially non-regression testing, at the user interface level is not yet well established. Testing automation solutions have been around for many years, but their implementation remains limited. The question, “What if you let robots do your functional tests for you?” is a relevant one. In this article, we’ll show you how UiPath, a “Robotic Process Automation” (RPA) platform and, in particular, its “Test Suite” module can help you automate it.
Robotic Process Automation: What is it?
Before getting to the heart of the matter, a quick reminder on “Robotic Process Automation” (RPA): This technology consists of having a software agent (i.e., a “Robot”) perform actions similar to those that an ordinary human user would perform, like clicking on a button, entering characters on a keyboard to fill in the fields of a form or to log onto a system, etc. The goal is to free employees from a set of tasks with low added value that a robot could perform for them, for example, copying information from one application to another or verifying the consistency of data between different systems, etc. You’d be surprised at the number of time-consuming and extremely repetitive tasks that are still part of the daily routines of many business teams!
The main difference with RPA compared to other automation solutions is that it’s an approach that doesn’t require modifying the systems to be automated. The robot performs its actions on the user interface as it is, whether it’s a web application accessible via an internet navigator or a “client heavy” application running on Windows. Of course, the robot also knows how to perform database queries, use web services, manipulate data and perform actions on files.
The other important point is that the RPA and, in particular, the UiPath solution follows a “Low Code” or “No Code” approach. In other words, you don’t need to be a seasoned IT developer to design the process (i.e., the rest of the steps) that the robot must follow to perform its task.
What does RPA have to do with functional testing?
A robot does not differentiate between running a process in a production environment or a test environment. What’s referred to as a process in the world of RPA is a Quality Test scenario. We write a scenario as a series of steps on user interfaces. When a robot processes invoices for an accountant, it’ll handle the most repetitive test cases for a quality engineer.
How to use UiPath Test Suite to automate your functional testing
Test Suite is a solution offered by UiPath to help you automate your functional testing. It includes three modules:
- UiPath Studio: the test scenario design tool (RPA processes)
- UiPath Test Manager: the web application in charge of managing test scenarios, their results and (optional) integration with your CI/CD (Continuous Integration/Continuous Deployment) platform
- UiPath Orchestrator: the web application for managing the execution of robots
- Ui Path Robot: the robot or software agent running the test scenarios on a (typically virtual) workstation
Only UiPath Test Manager is specifically used for testing automation. The other modules are included with the RPA platform.
Managing tests in UiPath Test Manager
UiPath Test Manager is the primary tool for your quality engineer. It offers one dashboard per project and displays its recent activity, including automation rates and coverage of successful, terminated or erroneous tests.
Comment s’organisent les différents composants de UiPath Test Suite ?
Tests are grouped by Test Set. Test Sets correspond to a set of features tested during a campaign. These features are divided into one or more Test Cases. This makes it possible to distinguish each important step. The Test Set can be compared to a book of which the Test Cases are the chapters.
In UiPath terminology, a test scenario is a Test Case. Test Sets and Test Cases are created in Test Manager. The Test Cases can then be associated with an RPA process in order to automate it.
What happens during the execution of a Test Set in Test Manager?
Some Test Cases are dependent on the execution of another upstream Test Cases, for example, a payment procedure depends on the creation of an order. To meet this need, Test Data Queues can be created, allowing the transfer information from one Test Case to another. The queue plays a leading role in serving as a holding area. In other words, it makes this information available, which will then be retrieved and processed by subsequent Test Cases. It can also be used to parallelize the execution of tests through the use of multiple workstations, thus saving a significant amount of time when running mass tests.
Execution of a Test Case can be launched manually from Test Manager. It’s also possible to plan and launch all the Test Cases of a Test Set or even an entire project.
Après l’exécution d’un Test Set, l’onglet Test Results permet de visualiser les statistiques et informations remontées. Il propose une vue globale avec l’ensemble des Test Cases avec leur statut Passed ou Failed. Nous pouvons également consulter les détails de chaque Test Case et ainsi observer chacune des assertions, c’est-à-dire des vérifications que le test effectue.
After the execution of a Test Set, the Test Results tab allows you to visualize the statistics and information reported. It offers a global view with all the Test Cases with their Passed or Failed status. We can also see the details of each Test Case and thus observe each of the assertions, i.e. the verifications that the test carries out.
Dashboard in UiPath Test Manager
Test Case Results in UiPath Test Manager
Designing Scenarios (Test Cases) in UiPath Studio
UiPath Studio is the tool that allows you to design scenarios (Test Cases) to automate. By default, a Test Case process is broken down into three sequences:
- Given: the initialization part, reception of input or configuration data – contextualization
- When: test execution
- Then: result of the test execution and next steps – sending the data to another Test Case via the Data Queue Tests, closing the applications
The design of a test scenario is similar to that of a standard RPA process, the difference being that there are some activities specific to the UiPath Test Suite. UiPath activities correspond to actions that the robot must perform: clicking on a button, entering a value into a field, an “If” condition, a “For” loop, filtering data in a table, etc. In addition to these standard activities, an assertion can be added to the scenario. As previously mentioned, it’s about verifying an element during the process. For example, the value of data displayed in the application relative to an expected result. The expectations in terms of results are generally taken from the functional documentation of the Test Case to be automated.
When the test scenario (i.e., the RPA process) is ready, UiPath Studio allows you to associate it with the Test Case in Test Manager and publish it in UiPath Orchestrator. From this point on, the scenario is ready to be executed.
Testing all possible configurations: multi-devices, multi-browsers & mobile
When functional testing is performed manually, it’s already difficult to achieve full coverage of an application’s functionality, but what about when it should be performed on all the devices used by your users (who may be your customers)?
UiPath Test Suite can integrate with platforms available in the cloud, such as BrowserStack or SauceLabs, to repeat the test scenarios on all configurations you’re looking to verify: various smartphones from various brands with various browsers, various PC configurations and tablets. As such, you’re ensuring that the latest version of your application that’s open to the public won’t generate errors and will remain compatible with the various supports covered by your testing scope.
Integrating UiPath Test Suite with your continuous integration platform
Each company has its own internal organization and uses different tools for bug tracking, incident management, project management and continuous integration. UiPath Test Suite offers connectors to the main CI/CD platforms on the market, including Azure DevOps, Atlassian and specifically the Xray plugin for Jira, Jenkins.
Integrating UiPath Test Suite with your CI/CD platform allows you to:
- Automatically associate tests declared on your CI/CD platform with tests in UiPath Test Suite
- Launch functional testing according to a pre-established schedule (for example, every night) or as soon as a new version of your application is deployed
- Synchronize test results in your CI/CD platform
Are you ready to start automating your functional testing?
This article has covered the main advantages offered by UiPath Test Suite for automating your functional testing. In following articles, we’ll go into more detail regarding some of the key functions (integration with CI/CD platforms, automation on mobile devices, a step-by-step for launching your project, etc.). We hope this article has encouraged you to take the next step. Our RPA teams are available if you have questions, comments or if you need help launching a project with the UiPath platform.