Telerik blogs

Can Test Studio fill the shoes of replacing iMacros as your next UI and robotic process automation tool? Short answer: Yes, and it can do even more!

With iMacros sunsetting announced, a vital question emerges on the horizon of UI and robotic process automation (RPA): What tool should I use instead?

Namely, tool is the key part here, as all of us who have already had their hands on any kind of UI automation would know the excess of reasons to use such. Of course, manual processing or hybrid repetition of tasks are always an option, but not a great time saver at all.

The idea of this blog post is to focus your attention on UI automation tool called Progress Telerik Test Studio that naturally covers all iMacros scenarios and brings additional benefits depending on your business cases. It will go through a real-life scenario workflow, build it from scratch, run and schedule accordingly. Following the steps below, you could replicate it yourself with Test Studio regardless of any learning curve necessity.

What Test Studio is

By its essence an end-to-end UI automation testing platform that works on any web, responsive and desktop applications. While testing belongs mainly to the realm of quality assurance (QA) engineers and might be a new term for users familiar with iMacros, the easiest way to relate is knowing that you cannot do UI testing automation without any robotic processing first. In other words, Test Studio can do:

  • mouse and keyboard clicks
  • form filling
  • data extraction
  • cross-browser automation
  • image validation
  • code (VB.NET or C#) or codeless recording
  • distributing and running scripts

So far so good, right? Sounds like everything you’d need to do with iMacros. But on top of that, Test Studio is easy to use even for less technical users. There is no need to spend a lot of time setting it up and it has great onboarding and modern UI and UX. Test Studio ensures business processes work flawlessly—from automating daily tasks to test automation. Most importantly, it offers outstanding customer support and professional services, done directly by the team that builds the tool.

What Test Studio is Not

A direct continuation of iMacros. Or a direct substitute of iMacros—i.e., you would not expect to copy your scripts from iMacros and paste them into Test Studio. It is a tool that allows easy replication of any iMacros script by re-recording it, which is the main topic of the second part of this blog post.

Getting Started

For the sake of content length, the following is not a pixel-perfect, step-by-step guide but outlines the main flow without the mandatory necessity of having prior experience with the Test Studio. At each point, you’ll find a link to the full help documentation so you can use it accordingly.

System requirements are not demanding—all you need is a decent Windows machine and a browser or two. A fully functional version of the tool in trial mode can be directly downloaded from here. Following the setup wizard is straightforward and you can refer to the corresponding documentation if help is needed.

Once done, you would launch Test Studio and land on the main page, ready to record your first test or script. Note that anytime you see the word test, whether in the documentation or the tool itself, you can refer to it as the actual script or macros you’d need to record. Additional getting started guides can be found here.

Welcome to Test Studio screen has options for web testing, desktop testing, wpf testing, load testing, open local project, and open source control

Click on the “Web Testing” button and create your first project. Now you should be able to access your first test/script and record it. Click on any of the record buttons on the screen and when asked for a navigation URL, paste your web application one.

web testing URL

For the sake of this demo, I am using an application (built with JavaScript and Kendo UI) that simulates a web portal for data entry, in my case different types of food and beverages. Each item has price and availability input, continuity checkbox and can also be edited or deleted. Having to enter multiple items by hand would take quite some time, so to automate the entire process, all I have to do is record the entry of one item only and close the browser.

Recording means that Test Studio will literarily record all the mouse and keyboard actions and later replicate them. You’ll know that recording mode is on by noticing the Test Studio recorder attached to the browser window:

Small Test Studio recording menu of controls shows on the right of the browser

Work with Data

Test Studio recorded total of six steps (from opening the app, adding name, price and availability to clicking the “Save” button to enter the first item—Matcha tea) as part of my script. At this point, I could select to run them, let go of the mouse and keyboard and observe what is happening or just continue doing any other tasks on my PC while the script is executed.

six steps passed

It is not time to do so yet, because the script would just insert one item, while I need a complete list. The easiest way to do it is by data-driving the project and the script. Test Studio can connect to different types of data sources like Excel, CSV file, XML or database providers like Odbc, OleDb, Oracle and SQL. I just created an Excel file that looks like this:

Excel file with product name listing tea names, unit price as number, units in stock with number of units, discontinued with true or false

And I am adding it to my project first by following these simple steps and then to my script like this. When working with large datasets, you can choose which parts of them to use in the script. In the case with Excel, you can select a specific sheet or even filter different rows.

Now I can click on any step that contains input (text or numbers) and from its properties select Bindings to connect it to a specific column of the Excel file. Starting with Step 3 (where the product name was typed) which will be bound to Column A as its InputValue:

InputValue allows selection of column, product name in this case

Step 4 will be bound to Column B and Step 5 to Column C. You can refer to this quick paragraph how to do it if you need more details. The step names would automatically change by the addition of DataDriven [$(ColumnName)] in their titles.

If you are wondering what Column D would serve for, provided it is not a text or numeric input, here comes the equally cool and fun part: Test Studio can automatically apply this based on the script and check/uncheck each item box depending on its continuity in the data source. What is necessary to do so? You should already know by now—just record the action once, for one item.

It is not necessary to re-record an existing script to add a new step within—I can just right-click on a specific step (like Step 5), after which the new one would be added, and select the run to here option. The script will execute up to that point and keep the recorder open, so any new mouse or keyboard actions will be captured.

Step 5 is selectd - run - to here

A new Step 6 was added and from its properties I select CheckedState to be bound to Excel Column D.

CheckedState Column D

That’s it! My script recording work is done, and if I chose to execute it, it will run as many times as there are rows in the Excel file, thus automating the data entry.

Play with Data

It is always work and play, isn’t it? While the script I recorded so quickly would serve me well, I’d like to enhance it to a degree that it would become bulletproof and serve me even better. Data validation is essential, and I’d make sure that all the records Test Studio entered are correct and correspond to their values in the original data source (the Excel file).

Let me validate the product names first. You know the drill already—run to Step 3 and record a new step. But before doing that, I am switching on the recorder highlighter (full details here). This means that I can hover the mouse on any element on the screen, and Test Studio will highlight it in color (as in the case with Matcha below) and provide a plethora of additional actions. I am selecting the input element, then Quick Steps and then a verification that the input value is indeed “Matcha.”

Matcha has a red box around it. Then in menus, input - Quick Steps - Verify input equals Matcha

The new step would look like Step 3 below. If you’d like to do the same verification for every new entered item, just bind it to Column A from the Excel file. You can do the same for the price and availability and, upon script run, all values will be validated accordingly.

KendoInput: value 'Matcha' entered.

If by any chance you are wondering what Extract – input value matches Match means, that option would extract any value and create a variable that you can reuse in other steps. In addition, you can also extract value even from images via optical character recognition (OCR) as explained here.

So if your question is: In such case, would I be able to extract data from one section of my application, or even different application and then use it in another? The answer clearly is: Yes!

What About Coding?

Coding in general has always been a borderline, no matter if you’d be using Test Studio for testing or script automation. Once that border is crossed, literally anything is possible because by using VB.NET or C# you can create any script within Test Studio, as you would have created it with code.

The question is would you rather go the full code, low code or no code way. Each option has its own pros and cons, but I’d pay more attention to the needed learning curves and maintenance efforts. Some food for thought can be found in this blog post if you’d like to learn more. I am not going to deep-dive into the matter right away but showcase yet another example (which itself deserves a separate blog post).

Let’s say I need to check forex data for specific periods (April, June and October 2022), download multiple files with it, perform validations and keep a record on what’s been done. And of course, I’d like to automate this as much as I can. Let me use the instance of Bulgarian National Bank and its forex rates throughout the years.

First, I am recording only one data search—the exchange rate for April 1, 2022 (no pun intended).

search by date 01 04 2022 is highlighted by a red box

Then I am going to download the results in a PDF file to whatever location I choose (something Test Studio handles by default via a special type of step).

save as - download format PDF

Once the script is recorded, I am going to bind the day, month and year elements to a data source (my favorite, Excel, again). On top of that, I am binding the file download path (could be different for the different files). I am also applying a verification if the file is generated (i.e., for June 4, 2022, there is no file available, while for October 13 there is).

Eventually I am unleashing my coding skills to automatically add a new column into the Excel file (write into datasource)—Column E that would contain a yes/no value depending on the file availability.

Column E is labeled 'Available' and the values are yes or no

And that’s it, my script is done. I can sit down, relax and let it execute and automate the job for me.

What About Running Scripts?

When done, you have the following options for execution:

  1. With a click of a button, the script can automatically run on your PC ad hoc or scheduled.

  2. On any other Windows machine of choice scheduled at any time, as very well explained in these two blog posts here and here. Following them would allow you to use the built-in Test Studio scheduling services.

  3. Integrating with external scheduling and execution systems like different CI/CD solutions, build servers and pipelines. Like in the example here for Azure DevOps.

Happy scripting!


Read more about Test Studio step-by-step, or try it for free today!


About the Author

Petar Grigorov

Petar is a Principal Sales Engineer at Progress with equal sympathy in coding and automation testing. In his spare time he turns into a DIY guy who can successfully setup and use anything from IoT gadgets to paintbrushes and a trowel. When not dreaming of piloting the Millennium Falcon, he is a fan of any engine that is close enough and runs on two or four wheels.

Related Posts

Comments

Comments are disabled in preview mode.