Recording of a Web Surfing Session

Recording and Post-Processing of a Web Surfing Session

This document describes how a Web Surfing Session can be recorded by using a HTTP/S Remote Proxy Recorder and then post-processed in the HTTP Test Wizard. After post-processing, a RealLoad Test can be generated.

Hint: As an alternative to using an HTTP/S Remote Proxy Recorder, you can also record web sessions using Desktop Companion.

Preconditions

The following assumes that a Firefox web browser is used for recording and that the CA Root Certificate of the HTTP/S Remote Proxy Recorder has already been imported into Firefox.

You must also have the ‘RealLoad Test Recorder’ browser extension installed in Firefox. It is recommended to only turn on this browser extension when recording a Web Surfing Session.

Preparing Firefox for Recording

The following text describes how to copy and paste a HTTP/S Remote Proxy Recorder Configuration into the Firefox ‘RealLoad Test Recorder’ browser extension.

You now need two web browsers from different manufacturers:

  • The Firefox browser
  • A Chrome browser that is signed-in into the RealLoad portal

In Firefox navigate to Manage Extensions

“alt attribute”

At the RealLoad Test Recorder extension click Options

“alt attribute”

“alt attribute”

Now use the Chrome browser, sign in to the RealLoad portal, navigate to the HTTP/S Remote Proxy Recorders menu, and Connect to the Proxy Recorder

“alt attribute”

After you are connected to Proxy Recorder with the Chrome browser, click on the ‘Red Eye Icon’ and copy the ‘Proxy Configuration Data’ to the Clipboard by clicking the corresponding icon

“alt attribute”

Then paste the ‘Proxy Configuration Data’ to the Firefox ‘RealLoad Test Recorder’ browser extension and click ‘Save’

“alt attribute”

Firefox is now ready for recording.

Tip: You can also Pin the ‘RealLoad Test Recorder’ browser extension to the Firefox Toolbar:

“alt attribute”

“alt attribute”

Recording a Web Surfing Session

The following example shows the recording of the purchase of a Cinema Voucher in the RealLoad Cinema Demo Shop.

cinema.realload.com is a public server available to you for educational purposes.

In the Chrome browser connect via portal to the Proxy Recorder and click on the ‘Red Eye Icon’:

“alt attribute”

In Firefox click the ‘RealLoad Test Recorder’ browser extension. When you are asked for the Proxy Authentication then paste the username and password shown in Chrome.

“alt attribute”

In the ‘RealLoad Test Recorder’ browser extension first enable Clear Cache & Cookies and then click Start Recording

“alt attribute”

In Firefox enter the URL https://cinema.realload.com/shop external link which is the starting point of the recorded session.

“alt attribute”

Optional: Have a look at Chrome and you will see that the first web page is recorded:

“alt attribute”

A cinema voucher will now be added to the shopping cart. In Firefox first insert a ‘Page Break’ with the comment ‘Add Cinema Voucher’, and then click on ‘Add to Chart’ in the shop:

“alt attribute”

Add another Page Break with the comment ‘Goto Chart’, and then click the Cart Icon:

“alt attribute”

“alt attribute”

The shopping cart is now displayed. Add another Page Break with the comment ‘Checkout and Pay’, and then click ‘Checkout and Pay’:

“alt attribute”

The receipt will be displayed and the recording is now complete.

In the ‘RealLoad Test Recorder’ browser extension, click Stop Recording:

“alt attribute”

Now return to the Chrome browser and click on ‘Refresh’. As you can see, a lot of URLs were recorded that were unwanted in your test. Click on URL Filter - Quick Settings to filter out the unwanted URLs:

“alt attribute”

Exclude any web servers that you do not want to be part of your test. In particular, you should exclude any tracking servers.

“alt attribute”

Then save the recorded session. You can later re-load the recorded session to (any) proxy recorder and filter it again:

“alt attribute”

After completing the recording, it is strongly recommended to switch off the ‘RealLoad Test Recorder’ browser extension. Only turn this browser extension on again when you record a new web surfing session.

“alt attribute”

Converting the Recording to an HTTP Test Wizard Session

In the HTTP/S Remote Proxy Recorder click ‘Convert’

“alt attribute”

Enter the Headline of the HTTP Test Wizard session (in this case ‘Purchase Cinema Voucher’) and click ‘Convert’:

“alt attribute”

The recording will now be converted and appears in the HTTP Test Wizard. We recommend that you save the HTTP Test Wizard session first before you start post-processing.

“alt attribute”

“alt attribute”

Post-Processing of the HTTP Test Wizard Session

Handling of Dynamic Session Values

If a dynamic value such as a order number is part of an HTTP response, and that value is then used in subsequent HTTP requests, you must handle this value using a dynamic session variable.

To identify such dynamic values, you can use the Variables Wizard, which you can access via the HTTP Test Wizard. First click on URL Explorer

“alt attribute”

Then in the URL Explorer click Variables Wizard

“alt attribute”

Now a list of Distinct Transmitted Values is shown in the Variables Wizard, which is extracted from all HTTP request of the session. The challenge now is to estimate which of these values are dynamic (static values do not need to be handled).

As a rule of thumb:

  • if the value is a simple speaking word, or a combination of simple speaking words, or a small number, it is probably a static value.
  • However, if the value is a complex, random string, it is probably a dynamic value.

In the image below there is only one dynamic value (receiptId = e1bjlSo9CoJLR9TL). Click on the magnifying glass icon to handle this value:

“alt attribute”

The session is now searched for this dynamic value e1bjlSo9CoJLR9TL. Click on the first search result of an HTTP response:

“alt attribute”

In this example, the HTTP response is in JSON data format. So click on the JSON tab:

“alt attribute”

Then click on the value of receiptId, and then click Test Extractor and enter a new Variable Name ‘(vReceiptId’ in this case). Finally enable the switch Assign Extracted Value as Variable to All Subsequent HTTP Requests and click the Define Variable Extractor button.

“alt attribute”

The handling of the dynamic session variable is now complete. Click the ‘Variables’ icon to check the variable extractor and variable assigners:

“alt attribute”

After you have processed all dynamic values, you should save the session again.

Reviewing the HTTP Response Content Validations

When the recording was converted, the verification of the HTTP responses were also automatically configured.

The received HTTP status code of each URL is always checked for the value it had at the time of recording. However, some URLs may also be automatically configured to additionally validate the response content against a text fragment. You should review these URL-specific text fragments and correct them if necessary.

In the HTTP Test Wizard click on Review and Edit URL Settings

“alt attribute”

Take a look at table column ‘V. Text’ and click on the text fragment wizard icons:

“alt attribute”

For example, for the URL https://cinema.realload.com/shop, it is better to choose the text fragment ‘RealLoad Cinema Demo Shop’ instead of ‘clone the product card template’:

“alt attribute”

After you have reviewed the content validations of the HTTP responses, you should save the session again - if you have made any changes.

Debugging an HTTP Test Wizard Session

After you have completed the post-processing, we recommend that you debug the HTTP Test Wizard session.

“alt attribute”

Since this is a Remote Debugger, you can choose which Measuring Agent the debugger runs on. This means you can also debug the session from different geographical locations.

“alt attribute”

Click on ‘Next Step’ until you reach the end of the session - or until an error is displayed. During debugging you will also see when the value of dynamic session variable is extracted from an HTTP response and when it is assigned to an HTTP request.

“alt attribute”

“alt attribute”

Generating a RealLoad ‘Test’ from an HTTP Test Wizard Session

If you were able to debug the session without errors, you can now generate a RealLoad Test from it. Click on ‘Generate Code’:

“alt attribute”

First click on ‘Generate Source Code’ and then on ‘Compile & Generate JAR’:

“alt attribute”

Then click ‘Define New Test’:

“alt attribute”

You can adjust the name of the test a little (it can also contain spaces). Then click on ‘Define New Test’:

“alt attribute”

Your browser will now be redirected to the ‘Tests’ menu and the test will appear at first position (if the sorting is set to descending test ID).

“alt attribute”

From here you can continue as described at the Tests Menu.