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.
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 therefore developed new ATS actions specific to this integration, you can put URL filters, start and stop recording as well.
Here is the detail of the operations to be carried out:
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">
You should know that the performance tag allows you to integrate other configuration elements.
For example, integration with Octoperf will allow you to transmit your HAR files directly into Octoperf projects to carry out load tests.
Les correspondances des paramètres sont les suivants:
- 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 menu appear on the right side of your screen:
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 at the bottom right.
The channel opening action shows an icon identical to the "Performances" menu
Add recording functions
Here is the detail of the different functions available:
Configure network capture.
You can modify the behavior of Agilitest when recording the replay of the test allowing to provide a .HAR:
- Latency : 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.
Adding a URL filter 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.
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: