Telerik Ninja for R1 2021 Release

Record and Playback testing has been underestimated by developers and senior QA automation engineers for quite some time. Yet, automated testing tools have evolved into offering a much easier, smarter and more sustainable way of testing web and desktop applications while eliminating the common disadvantages of codeless/low code testing.

Where Do You Stand?

Regardless of whether you are within an organizational change, making the transition from manual testing to test automation or if you are trying to accelerate your software development release cycles, modern Record and Playback testing tools like Test Studio can save you tons of time by helping you craft tests that just don’t fail.

The Benefits of Visual Test Recording

The value of using a visual recorder to automate comprehensive scenarios hasn't received the attention it deserves, mostly because Record and Playback testing tools are known to have some significant limitations. In a recent article, Karl Hughes argued that codeless testing tools can remove some of the most significant barriers that stand in the way of test automation today, for both experienced automation engineers and non-technical stakeholders.

In fact, while I was working on this blog post, I identified at least these three advantages of using Record and Playback testing interface for the purposes of this demo:

  • I saved a lot of time that I was able to dedicate to ensuring the level of stability of the test suite that I was aiming for
  • I achieved a level of code coverage that I wouldn't be able to deliver if writing automated tests from scratch based on some of the most common test automation frameworks
  • I developed a test suite that is quite easy to maintain—thanks to the tests being hosted outside of the code base without adding automation maintenance debt / overhead

Blazor UI Automation: The Game Changer

Test Studio offers exclusive out-of-the-box integration with Telerik UI suites through built-in translators, now with extended features. The latest Test Studio release is shipping with new translators for the most popular and widely used Telerik UI for Blazor components to facilitate and optimize UI testing of Blazor apps.

Test Studio's native translators for Telerik UI for Blazor components open the element and expose the specific and custom properties for action automation and verification through a genuinely codeless UI automation approach without compromising the quality and efficiency every automation engineer is looking for. In fact, the story of Blazor testing based on the native approach I am going to demonstrate, may just be Blazor's biggest potential beyond the pure advantages of C#.

Why is that?

Automation of Telerik UI for Blazor Components Within Visual Studio

In this blog post I am going to use Test Studio Dev Edition—Test Studio's native plugin for Visual Studio—and demonstrate Blazor Grid automation within Visual Studio 2019 as an example of how the Record and Playback testing functionality has evolved and how this can make test automation easier, faster and with less hurdles.

For the purposes of the demonstration I’ll build following scenario:

  1. Load a sample Telerik Blazor Stock Portfolio application
  2. Verify the number of the items in the Blazor Data Grid
  3. Add a new stock ticker
  4. Verify the number of the items in the grid has increased
  5. Verify I have added the correct ticker symbol
  6. Verify the stock price

Once I navigate to the loaded Blazor application I can use Test Studio’s intuitive visual test recorder to easily craft action and verification steps. Test Studio accurately converts UI actions like menu selection, drag-and-drop and hovers into test steps:

Record and playback testing tools

In less than a minute I have the above-mentioned scenario recorded in a few maintainable steps, so that from now on I can execute the test and include it in my test suite. My recorded test looks like this:

Record and Playback testing tools

Facing the Reality

It is a popular sentiment that when you play a recorded test it will be working only if the application remains unchanged. Even minor changes to the application UI that affect the DOM prevent the recording from being executed correctly, resulting in a dozen broken tests that need to be rerecorded.

Luckily, recorded tests are no longer a single, unchangeable monolith. Modern tools like Test Studio allow the user to split the recorded tests into separate tests that can be deleted, rearranged and even converted to code, from where further tweaking or maintenance can be performed easily.

Furthermore, each visual object is being identified and recorded by a sophisticated find logic mechanism ensuring uniqueness of the element, stable test execution and less time spent in test maintenance. Even upon major element changes it is easy to update its recorded find logic and apply it to all or just a few of the selected sets of tests that use it.

Converting Codeless Tests Into Coded Steps

For skilled developers and automation QA engineers, modifying and updating a scripted test can be easier than fixing a recorded test. Imagine you’ve written a script to test three different components of the application.

If you need to change part of the test that exists in multiple components, you can use your IDE to search and replace, or to create a method to make the test more efficient. Reusing parts of your test can often be easier when done in code than in recorded tests.

That is why Test Studio comes with the neat feature that allows you to convert the recorded test to code and expand it as you need in order to meet your scenario's requirements.

Record and Playblack testing tools

Once you have your test converted to code, your options for maintenance and extensibility are endless. You can reference external libraries, write your own methods, classes and custom execution extensions that help integrate Test Studio better in your environment and solve even the most challenging scenarios. You will find more details on how to build your own execution extension.

About Test Studio’s Latest Release

Creating stable test environments and writing test scripts can be impossible to pull off within tight project deadlines. Yet, to achieve your goals you’re going to need more than just a “testing tool”. Through the updated UX and fully redesigned UI, the Test Studio Recorder now offers intuitive design and optimized performance, making it an integral part of the transition from manual testing to browser automatation, with cross browser support and complete feature set for functional UI, responsive web UI, RESTful API,  load and performance testing. As of the latest release, Test Studio also shipped with:

  • New interface of the recorder panel, now called "Advanced Recording Tools", with easy access to Step Builder, Common Steps and Browser Control
  • Improved translators for Telerik UI for Blazor Grid and Blazor Window
  • Translators for Blazor TextBox and ComboBox allowing verification of selected content by text and index
  • Translators for Blazor Tabstrip, AnimationContainer, Drawer and ListView
  • New Test Studio UI theme with dark mode for seamless optical integration into Visual Studio

About Test Studio Dev Edition

The Dev Edition is the Test Studio plugin for Visual Studio. It is available as part of the DevCraft Ultimate product bundle based on a per-developer license. The plugin is also included in the Test Studio standalone application which is distributed as floating machine license. The Dev Edition comes with a comprehensive feature set to facilitate easier and quicker test automation, especially of Telerik UI-built applications, within Visual Studio.

Conclusion

The ever-increasing demand of superb software quality have changed a lot of the tools that we use and our own outlook on software development and software testing. Record—Playback provoked by the need of efficiency evolved into Record—Playback—Code. Modern test automation solutions like Test Studio provide this type of experience and efficiency needed by developers, automation QAs and regular testers.

Download Trial


Ivaylo Todorov
About the Author

Ivaylo Todorov

Ivaylo is a QA Engineer on the Progress Test Studio team, where he helps build a better and more reliable product. Before starting as a QA Engineer, Ivaylo spent three years as a Technical Support Engineer in Test Studio doing his best to guide customers in their automation endeavours. Ivaylo enjoys skiing, cooking and portrait photography. 

Related Posts

Comments

Comments are disabled in preview mode.