Browser-driven with Chrome and Firefox

Micro Focus Expert
Micro Focus Expert
1 0 1,273

With version 19.0, Silk Performer has extended the browser support for browser-driven load testing. This means that you can now replay browser-driven load test scripts also with Chrome and Firefox. Silk Performer has been offering the browser-driven technology for quite a long time now - it has been introduced in 2010. This blog post will give you a quick introduction to the basics of the browser-driven technology, and then we will show you how to use both Chrome and Firefox to replay a browser-driven script. So, let's get going.

Browser-driven with Chrome and Firefox - Blog graphic 1.png

The Browser Application

If you want to use the browser-driven approach for your load testing efforts, it is essential to learn about the Silk Performer Browser Application first. The Browser Application has always been the foundation for browser-driven load testing. And it still is, mainly because of the following two reasons: (1) It hosts the so-called Internet Explorer Control, as well as the Locator Spy and the Record/Replay Window (see the illustration above). These components offer a number of useful features that an ordinary browser does not offer. (2) The Browser Application is still required for recording your browser-driven scripts. For replay, you can now choose between three browsers: IE, Firefox, and Chrome.

Why browser-driven?

Why would you want to use browser-driven load testing with different browsers in the first place? There are two main benefits, one for the server-side and one for the client side:

  • Server-side benefit - a more realistic load: The server is accessed from a variety of browsers, which all can behave quite differently. This results in a more realistic load on the server.
  • Client-side benefit - different, varying results: Different browsers provide different, varying results for the same metrics.

Besides these two main benefits, there's another reason for browser-driven: For the load test engineer, it is just a simple and convenient way of creating load test scripts.

Recording a browser-driven script

Let's now step through an example workflow for modeling browser-driven load tests. We start by creating a new project of type Web browser-driven and enter the URL of our demo website. On the Model Script dialog, you can see that the Browser Application is pre-set as recording profile. We start the recording and the Browser Application displays. We perform a few interactions within our web application and then stop the recording.

A trial run with IE

Let's first perform a normal trial run using Internet Explorer: We click Try Script on the workflow bar. On the Try Script dialog, we can now select a browser for the trial run (1). Note that for Chrome and Firefox, the options Step by step execution (2) and Pause on error (3) are not available. If we want to use these features, we have to select Internet Explorer. Let's do so and make sure that Step by step execution is enabled. By the way: the option Visible client (4) is available for all browsers. We click Run (5) and the Browser Application displays in Replay mode.Browser-driven with Chrome and Firefox - Screenshot 01.png

Using the Browser Application features

We can now make use of the complete feature set that the Browser Application offers, like including elements in the TTI, adding verifications, stepping through the script, or using the Locator Spy. This allows us to comfortable adapt the script to our needs. The alternative would be to manually add code to the load test script. Once the trial run is fully executed, the Browser Application closes and the Try Script Summary page displays.

Trial runs with Chrome and Firefox

We click Try Script on the workflow bar, select Firefox from the Browser list and click Run. Firefox displays and executes the script. That's all there's to it. We can repeat these steps to also try the script with Chrome. If both trial runs have been completed without errors, we can move on to creating a couple of profiles.

Creating profiles

To use a set of different browsers in our load test, we need to create different profiles: We right-click the Profiles node, click New Profile, and give it a name. Then, we double-click it, go to Web (Browser-Driven) (1), and set the browser (2). We repeat these steps until we have three profiles, named Chrome, Firefox, and Internet Explorer (3).Browser-driven with Chrome and Firefox - Screenshot 02.png

Viewing the results

To try out the load test with all three profiles, we click Run Test on the workflow bar, select the Verification workload, and click Run. After a little while, the execution is completed and the Load Test Summary page displays. We click Explore detailed report and review the data in the Test result overview area (1). Here we can see three lines (2), each representing data for one of the profiles, hence for one of the browsers.Browser-driven with Chrome and Firefox - Screenshot 03.png


Replaying browser-driven load test scripts is now also possible with Chrome and Firefox, which gives you even more tools for executing realistic load tests with Silk Performer.

Watch the video

In the following video, you can watch how we performed the above described steps:

More information

To learn more about all new features and enhancements Silk Performer 19.0 provides, take a look at the following blog posts:

The Silk Performer Help is another comprehensive source of information.

If this article was useful for you, leave us a comment or like it. We appreciate your feedback.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.