Load Testing With Real Browsers Using Tricentis Flood Element

Get Ready to Experiment Intelligent Load Testing for DevOps using Tricentis Flood Element Tool.

Load Testing is a very popular type of testing which all of us as testers must have come across.

So, while thinking of load testing, maybe, you are frustrated with the current solutions you are using and find it to be too difficult to write and maintain your tests. Or maybe, you are even thinking about doing load testing for the first time.

Either way, it’s a great first step to be thinking about load testing at all – which many companies don’t and suffer the consequences.

Flood Element

Overview

There’s an established link between app performance and important business metrics, such as revenue, customer signups or more general customer satisfaction.

All companies that do business on the web must need to ensure that the performance doesn’t negatively impact these key measures. Even when these measurements are improving, you might find that the app could run better to consume fewer resources, saving you and your user’s money along the way.

Whether you are brand new to load testing or if you have experience in the field, you might be likely aware of the dizzying array of tools and approaches that are available to get the job done.

Flood Element – An Excellent Load Testing Tool

Today I’d like to review a new favorite load testing tool – Tricentis Flood Element.

Many popular tools operate at the protocol level and they attempt to approximate the users’ behavior on your app by issuing network requests.

However, in today’s world wide web, web apps are becoming more and more sophisticated and are as well as utilizing more of the browsers’ ever-growing list of features than ever before.

Even simple apps like an online shop use a plethora of browser features to make the experience of choosing items, ordering and paying online as smooth as possible for a user.

Browser level and Protocol level testing

Hence, in this modern era of the web, only protocol level user (PLU) testing can give us much of the picture of our app’s performance. By contrast, new tools like Flood Element, test by simulating the user behavior using real web browsers. We call this approach as Browser Level Users (BLUs).

In Flood Element, simulated user behavior is defined using simple, natural actions such as clicking links & buttons, filling in web forms and so on. Once you have defined the behavior, it’s a snap to run at a huge scale at Flood – by huge scale, I mean thousands of users from all over the globe!

Load testing with Flood Element can help you develop a holistic, intuitive view of your app’s performance as experienced by any user. Considering ourselves as users, it’s also significantly easier to get started with an Element BLU test than with the traditional PLU tools.

BLUs help to get a realistic view

BLUs help you to get a realistic view of your whole app’s performance, right from top to bottom. Whereas PLUs only test what’s under the waterline i.e your network and server infrastructure.

The Holistic View

Using Flood Element to measure the performance on your whole app from the users’ perspective is a great way to develop a holistic view of your app’s performance and thus defend against the unexplained changes – be they temporary anomalies or perhaps the regressions in the code.

Flood Element BLU tests provide a view of the performance which is much closer to the user experience.

They consider each and every part of the performance that a user will experience: network performance, but also on-page script performance as well as third-party scripts such as analytics or advertisement add-ins (in fact our tests are so realistic that you need to take steps not to create false data in Google Analytics.)

If running a BLU load test with Element gives you a holistic view of your app’s performance at a point in time, then running tests regularly allows you to build up an intuition of whether your app is getting faster or slower, perhaps suddenly as in the signup widget scenario.

Getting Started with Flood Element – Writing a Test

Now let’s see how easy it is to get started with Flood Element.

Element scripts are written in TypeScript or modern JavaScript. For best experiences, we recommend using the awesome combination of TypeScript edited using VS Code, as it gives you a lot of useful assistance in developing your tests.

Install Flood Element:

You can install Element using the getting started instructions here. Once installed, edit and test your script locally, and when you’re ready, upload it to Flood to perform a full-scale load test by signing up for a trial here.

A basic Element BLU test for the signup scenario above might look as shown below

basic Element BLU test for the signup scenario

If you’re familiar with testing at the protocol level, then you know that all timings are arranged around request-response transactions.

When learning to test at the browser level, there are a few extra subtleties to take into account when finessing your tests. In particular, there are no real built-in timing groupings, so we need to introduce our own timings in the structure of our test.

The simplest approach for grouping timings is to wait for the necessary elements to appear on the page — just like a user would.

From the scenario above, we’re interested in timing the user experience of signing up, but not as much as the loading of the page. So, in the first step, we simply visit the URL and wait for the page to reach a known state — until the title is shown.

Flood Element Step 1 - visit the URL and wait till the title is shown

Next, we perform the action that we’re actually interested in keeping an eye on, which includes filling in and submitting the signup.

Flood Element Step 2: signup scenario

Now it’s time to save the script locally so that we can upload the script to Flood and run it with hundreds, or even thousands of concurrent users.

#1) (If you haven’t already) sign up for the flood.

Signup for the flood

#2) Create a Project:

Create a new project in Flood

#3) Click the “create flood” option in your new project

create flood option

#4) Create your test using the Flood Element Option

Test creation using Flood Element

#5) Name your test

Name your test in Flood

#6) Upload the .ts script that you have created

Upload the .ts script in Flood

#7) Set the number of browsers (users) as well as # of regions to get the total # of users (# of browsers * # of regions). Also, don’t forget to set your test duration.

Setting number of browsers (users) and test duration in Flood

#8) Launch your test and wait for the results to come in.

LAUNCH TEST in Flood

#9) Once results are in, view your graph and jump into any problem areas that they may highlight.

View Results in Flood

Conclusion

We hope by now, you are aware of why (and how) to test with Browser Level Users using Flood Element. With this new approach, we’ve eliminated a lot of the pain of creating load tests, and as well as we’ve also made the results more realistic.

Tricentis Flood is a distributed load testing tool in the cloud which seamlessly integrate across the DevOps pipeline.

With this performance and Load testing tool, the entire team can now measure and improve the performance of an application.

It may seem daunting to get to testing with thousands of users, but it’s easy to take one step at a time:

  1. Download element.
  2. Write a simple test locally, covering your key scenario (i.e. checkout).
  3. Run the test locally with ‘element run’ to make sure that the test runs completely.
  4. Upload your test to Flood and run with 5-10% of your max load (i.e. if your max load is 5,000 users, start with 250-500 users).
  5. Assess the results and tweak your script and app as needed.
  6. Upload your test to Flood and run with 50-100% of your max load (i.e. if your max load is 5,000 users, then run with 2,500-5,000 users).
  7. Increase your test coverage to cover the additional scenarios required, until you achieve the test coverage that you desire.

Depending on the complexity of your test scenario, you might be able to get up and run with thousands of users in under a day.

Get Flood Element to start experimenting load testing features.

Feel free to share your experience in the comments section below for our fellow testers to learn from!!


4 thoughts on “Load Testing With Real Browsers Using Tricentis Flood Element”

  1. Sorry for asking question of another topic……am getting error “InternetExplorerDriver cannot be resolved to a type”……can anyone help whats wrong in the code
    import org.openqa.selenium.WebDriver;

    public class STH {

    public static void main(String[] args)
    {
    System.setProperty(“webdriver.ie.driver”,”I:/TodaySeleniumSession_06-Jun-2018/iexploredriver.exe”);
    WebDriver driver=new InternetExplorerDriver();
    driver.get(“http://www.softwaretestinghelp.com/”);
    driver.manage().window().maximize();
    }
    }

Leave a Comment