Categories

Automation of Octoperf scenarios

What is Octoperf?

Octoperf is a SaaS and On-Premise Load Testing solution.

Agilitest allows you to automate the generation of scenarios and to import them directly into your Octoperf account.

The two solutions are therefore very complementary since you will be able to transform any functional test carried out with Agilitest into a load test in Octoperf.

Principle

The principle is as follows:

  • You record a functional test scenario with Agilitest
  • You decide that this scenario is a good candidate for load-up tests carried out with Octoperf: you add the ATS actions necessary for its instrumentation
  • Then you replay this scenario, Agilitest will generate a .HAR file and can transmit it directly to your Octoperf account, in the worspace and the project you want.
  • You can then use in Octoperf the data that has been imported by Agilitest to carry out load tests, and analyze the results.

This makes it possible to benefit from the Agilitest capability of recording and replay  a scenario to transform any functional scenario into a load test.

We have therefore developed new ATS actions specific to this Octoperf integration.

Here is the detail of the operations to be carried out:

Activation of the Octoperf mode

First of all, you must activate the Performance mode, you allow the generation of HAR files

It is also necessary to activate the Octoperf mode, and the two operations can be carried out at the same time, because you will have to modify your .atsProperties configuration file and insert a <performance> tag inside the <execute> tag.

The following code activates the two necessary modes:

<?xml version="1.0" encoding="utf-8"?>
<execute>
  ...
<performance>
<octoperf>
<host>https://api.octoperf.com</host>
<apiKey>1b3b3b85-bbb5-219b-936b-61bb521b23ed</apiKey>
<workspaceName>AgilitestWorkspace</workspaceName>
<projectName>AgilitestCaptureProject</projectName>
</octoperf>
<idle>4</idle>
<blacklist>
<url>https:\/\/www.google.com.*</url>
<url>https:\/\/accounts.google.com.*</url>
</blacklist>
</performance>
  ...
</execute>
...

The parameters are as follows:

  • host : corresponds to the address of the Octoperf server, in general leave it by default.
  • apiKey : corresponds to your API key which you can obtain on your Octoperf account by clicking on the "Profile" section of your account

Profile section of your Octoperf account

It is then displayed not visible at the bottom right, you just have to make it visible and copy it by clicking on the "eye" icon.

API Key
  • workspaceName : Corresponds to the name of the Octoperf workspace in which your project is located
  • projectName : The name of your Octoperf project

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

New Performance menu to the right of possible actions

The Performance menu is scrollable and displays the following submenus:

Specific Octoperf actions

Open a channel in Octoperf 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 brings up an icon identical to the "Performances" menu


Opening of a channel with activation of network functions


Add integration functions with Octoperf

Here is the detail of the different functions available:

Settings

Will allow you to configure the network capture.

"Configure network settings" menu

You can modify the behavior of Agilitest when recording the replay of the test 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). The default value of this parameter can be modified with the <idle> tag in your .atsProperties file.
  • 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.

Allowed URL filter

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 in switch on / off mode allows you to tell Agilitest when you want to start recording network traffic.

Recording action: recording is now disabled

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

Resume the recording

Save VU

Action save VU

This action completes the registration, finalizes the generation of the .HAR file and sends it directly to your Octoperf account according to the methods defined in the configuration parameters of your .atsProperties file.

You have the possibility to act on the following information:

Modification of the description of the virtual user
  • Modify the description of the VU that will be sent to Octoperf
Backup settings for the virtual user
  • Change the name of the virtual user
  • Add a list of tags, separated by commas which will be used in Octoperf.
  • Select the possibility of appending the actions.
  • Append: the HAR actions accumulate in your Octoperf project
  • Don't append : the HAR previously saved in your project are erased before sending the HAR file.
Still require support?
Contact support