Categories

Automation of HTTP Archives

Agilitest allows you to automate the creation of HTTP Archive (HAR) files which will be useful for analyzing network flows during the execution of a test.

HAR format

The HAR format makes it possible to record the details of the Urls  visited and the chronology of their loading made during an HTTP request.

It records the information related to all of the pages, files and images that are downloaded by a browser when you visit a URL.

You can then use a .HAR file viewing software that will allow you to display this query graphically.

You can obtain this result :

More information on the HAR format: https://en.wikipedia.org/wiki/HAR_(file_format)

How it works in Agilitest

The HAR format recorded by Agilitest involves more than visiting a  single URL, it can record all of the performance of a software test and  all of the URLs that were visited by the test, and it can do it action  per share.


We have an ATS actions specific to this integration, you can put URL filters, start and stop recording as well.

Activating performance mode


The performance mode is not activated by default in Agilitest.

To do this you will need to modify your .atsProperties file and insert an XML element <performance> inside <execute>:

<?xml version="1.0" encoding="utf-8">
<execute>
  ...
<performance>
<idle>4</idle>
<blacklist>
<url>https:\/\/www.google.com.*</url>
<url>https:\/\/accounts.google.com.*</url>
</blacklist>
</performance>
  ...
</execute>
...

The performance tag allows you to integrate other configuration elements.

Example:

Integration with Octoperf will allow you to transmit your HAR files directly into Octoperf projects to carry out load tests.

The parameters are the following:

  • idle : Allows you to change the default network timeout. See the "Configure Network Capture" action below.
  • blacklist: allows you to specify URLs whose browsing information you do not want exported to the HAR file. This allows you to remove advertisements, for example.

Once this configuration is done, if you restart Agilitest, you will see a Performance action  appear on the right of the actions menu:

The Performance menu is drop-down and displays the following sub-menus:

Open a channel in HAR recording mode

You must create or modify your channel opening action to indicate to Agilitest that you wish to activate the network recording and control functions.

Click on the third icon to the right.

performance button

The channel opening action will make the "Performances" icon appear.

channel with performance action


Add recording functions

Settings

This action will allow you to configure the network capture

You can modify the behavior of Agilitest when recording the replay of the test allowing to provide a .HAR:

  • Latency:  This allows you to add latency in seconds to all requests sent and received by the web browser in use by Agilitest.
  • Traffic idle:  Maximum time in seconds before considering network traffic to have ended after the last recorded network activity (default: 3 seconds).
  • Upload: Limits the uplink bandwidth in bytes / second.
  • Download:  Limits downlink bandwidth in bytes / second.
  • Add URL filter: This allows you to filter the URLs that will be counted and saved in the corresponding HAR file. You can add as many filters as you want.

You have the option of adding unauthorized URL filters, which will therefore not be saved in your HAR file. As this is more of a general configuration topic, this is done directly in the configuration of your .atsProperties file.

Record

This action is a switch on/off which tells to Agilitest when you want to start recording network traffic.

You can stop and resume recording at will depending on the actions that are performed by Agilitest.

Recover HAR file

When your test is performed, if the channel has been opened in Performance mode, the channel closing action will generate the .HAR file.

You just have to recover it in the following directory:

target/performance/generateHAR.

Still require support?
Contact support