Logo
blank Skip to main content

Using UIPath to Prepare Performance Testing Data

QA

The future is already here. Robotic innovations can easily handle difficult tasks and make our lives more comfortable. Even in software development and testing, robots can automate many activities.

In this article, we overview robotic process automation (RPA) technology and a popular RPA tool โ€” UIPath. We look at this tool from an unusual angle, exploring ways you can use UIPath to prepare performance testing data.

This article will be useful for software testers, quality assurance specialists, and anyone interested in unusual applications of RPA technology.

Applying RPA in software testing

What is RPA? Robotic process automation technology is based on the use of software robots, or bots. These robots can be configured to manipulate applications and systems and thus execute tasks. RPA is the scripting of repetitive user actions based on the graphical user interface (GUI) image recognition. By interacting with user interfaces, RPA robots mimic human actions with digital systems, transfer and interpret data, and trigger responses to events.

RPA robots can be used for automating the majority of routine tasks and processes:

 RBA use cases

Automation makes repetitive processes less time-consuming, decreases the risk of human error, and allows employees to focus on more important tasks.

Software testing is one of the areas that can benefit greatly from the use of RPA. In particular, different RPA solutions can be used for automating processes such as preparing test data for performance testing.

Currently, there are two popular RPA solutions on the market:

Weโ€™ll overview the capabilities of Automation Anywhere in future articles. For now, letโ€™s focus on UIPath and its use in software testing. Below, we highlight the general capabilities of this tool and share our experience using UIPath for performance testing data preparation.

Related services

Specialized Quality Assurance & Testing Solutions

UIPath as a software testing tool

So what is UIPath? UIPfath is a popular robotic automation process platform that provides various capabilities for automating business processes. The platform is composed of three main components:

  • Studio โ€” a desktop application for writing scripts
  • Robot โ€” an agent that executes scripts on a userโ€™s computer
  • Orchestrator โ€” a web interface for managing scripts and robots
 UIPath architecture

There are also additional tools, including ones for working with machine learning models and chatbots.

UIPath can automate both web and desktop applications and can be integrated with most Microsoft Office applications, including Excel and Outlook. Currently, the platform supports only Windows and offers four subscription options:

  • Community Cloud
  • Studio
  • Enterprise Cloud
  • Enterprise Server

In this article, weโ€™ll use Community Cloud, the free edition of UIPath. Community Cloud provides you with basic UIPath features and three robots. Thatโ€™s enough for evaluating the overall capabilities of the platform and for accomplishing our task within this article โ€” generating test data for performance testing.

Letโ€™s see what you can do with this RPA platform when testing your software products.

Read also:
6 Ways to Improve Software Testing

Using UIPath to prepare test data: a practical example

Preparing test data for performance testing is a perfect task for RPA solutions, as theyโ€™re great at collecting and merging data from various sources and in various formats.

Letโ€™s see how we can prepare data for software performance testing with an RPA tool. Say we have a feature that supports four web browsers and works with different browser data: browser history, downloads, bookmarks, cache, and cookies. To make sure this feature performs smoothly, with no interruptions, errors, or data leaks, we should test it with massive amounts of browser data.

Note: The volume of test data should significantly exceed regular volumes of data that the solution under test is supposed to process on a daily basis. Only then can you ensure proper efficiency of performance testing.

For a web browser feature, weโ€™re talking about the amount of data that a regular user would create in a couple of years of working with a browser. Based on our previous projects, we would say itโ€™s enough to generate about 300,000 browser history records, 1,000 bookmarks, and around 100,000 download records.

Creating massive browser artifacts manually would take too much time. And hereโ€™s where UIPath comes in handy: using this tool, we can automate the generation of test data.

Most of the work is done in Studio, where we create scripts. The overall process of generating test data includes three key steps:

  1. Generating scripts
  2. Testing and debugging scripts
  3. Turning scripts into robot-executable packages
 3 steps of data preparation in UIPath

Letโ€™s look closer at each step.

Generating scripts

In UIPath, designing new scripts is rather simple, as it resembles the process of building a diagram in a flowchart maker. Studio offers a rich selection of predefined script blocks. All you need to do is select the blocks you need sequentially (Figure 1).

 UIPath scripts

 

Figure 1. Scripts window in UIPath

Once selected, script blocks can be configured and tuned with the help of special functions (Figure 2).

 UIPath functions for script blocks configuration

 

Figure 2. Built-in functions for configuring script blocks

UIPath currently offers 337 functions for tuning standard scripts.

As weโ€™re working with a browser feature, the first block we need to add to our script is for launching the web browser. In UIPath, this is done with the Open Browser function that launches a specified browser and opens its home page.

Open Browser has a wide selection of options: among other things, you can select the target browser (BrowserType), choose to start a new session (NewSession), or choose to open an incognito session (Private).

Note: In order for the Open Browser function to execute successfully, you need to install a corresponding UIPath extension on your target browser. This extension will also be used as an interface for further communication between the UIPath robot and the browser.

As our goal is to generate various browser artifacts, we can create a script based on a simple algorithm of actions:

  • Start the browser
  • Open a URL
  • Add the URL to bookmarks
  • Download a file
  • Close the browser

For each of these actions, thereโ€™s a special function in UIPath. For example, one way to create a bookmark in any browser is by using the CTRL+D hotkey. By using the Send Hotkey function, we can emulate bookmark creation by a user.

Read also:
Developing and Implementing Autotests for a Multi-Component Enterprise Application

Testing and debugging scripts

A new script is composed pretty much like a puzzle: you select a block for a particular action (say, launching a browser), add it to your script, and check if it works. Script testing is performed manually for each newly added block.

Once all the script blocks are composed into a single sequence, run the entire script once more to test its performance. If one of the steps isnโ€™t performed properly, go back to the responsible script block and check its configuration.

Turning scripts into robot-executable packages

Once youโ€™ve checked and debugged your script, you need to loop the sequence of user actions for the required number of repetitions. In UIPath, thereโ€™s a For Each operator that allows you to perform single actions as well as a series of activities for each element of a script.

As we donโ€™t need to open and close a browser window each time we create a new bookmark and download a file, for instance, we can use the For Each operator to loop only the steps performed within the opened browser window:

  • Open a URL
  • Add it to bookmarks
  • Download a file

Since our example feature is supposed to work with four web browsers, we need to create four different packages โ€” one package per browser. Then we assign these packages to UIPath robots โ€” one package per robot. Since the subscription model weโ€™re using provides us with only three robots, weโ€™ll need to assign two packages to one of them.

After that, our mission is complete and we can automatically generate the browser artifacts corresponding to a couple of years of web browser exploitation by a human user. Next, we can feed this data to the Bot Creator in Automation Anywhere to configure a corresponding bot.

Read also:
A Comprehensive Guide To Performance Testing Metrics, Stages, and Tools

UIPath pros and cons

To summarize our experience preparing data for software performance testing using UIPath, letโ€™s look at the key pros and cons of UIPath:

Table 1: Pros and cons of using UIPath for software testing

PROSCONS
Cross-browser solutionPaid license is required to use more than three robots or implement advanced features
Provides a free subscription model with a sufficient feature setNo support for object-oriented programming (OOP), leading to linear code with multiple duplications
Little to no learning curveNo error logs or thorough system logging in Orchestrator
Provides a handy tool for writing scripts with a rich selection of customization options
Scripts are easy to adapt to a productโ€™s new user interface

Related services

Security Testing

Conclusion

UIPath is a useful robotic process automation tool that can be used not only for automating business processes but also for preparing quality test data for software testing. This platform is easy to work with and highly configurable. Plus, the capabilities of its free version are sufficient for preparing test data for small projects. Overall, executing automated preparation of testing data with RPA tools can help software testing specialists spend less time on routine tasks.

At Apriorit, we have a team of quality-obsessed software testers who can ensure your solution performs just the way you want it to. Get in touch with us to start discussing your project.

Have a question?

Ask our expert!

Tell us about
your project

...And our team will:

  • Process your request within 1-2 business days.
  • Get back to you with an offer based on your project's scope and requirements.
  • Set a call to discuss your future project in detail and finalize the offer.
  • Sign a contract with you to start working on your project.

Do not have any specific task for us in mind but our skills seem interesting? Get a quick Apriorit intro to better understand our team capabilities.