How to Automate Load Testing for DevOps using the WebLOAD API

Published by David Buch on September 06, 2017

Webload-APIAutomating load testing and integrating it with other processes is becoming more and more common. WebLOAD lets you automate load tests and build continuous integration processes with tools like Jenkins and Bamboo, but in some cases, you may need additional flexibility to accommodate other environments or needs.

WebLOAD resolves this with an open API, which lets you execute sessions, prepare reports, access data, etc.


The WebLOAD Open API

The API provides a dynamic explanation and is accessible via the WebLOAD Dashboard, using the link:


Of course, replace ‘{server_address}’ with your server name.



Click any of  the links to view the relevant API for running sessions, preparing reports, getting results, etc.



Each API can be created easily using the UI, as seen below:



Use Case Example

Assume you run a Load Testing session, access to data and create a report using automation only. The session runs in a context of a UNIX script, but it can be converted to other programming languages based on your needs.

Start a new session from a template ‘my.tpl’ and store the results in ‘’
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'template=my.tpl&' 'http://localhost:8080/api/session'

Sample response:


  "code": "STARTED",

  "response": "New Session started.session/23",

  "sessionid": "23"



Check the status of the session by extracting the session-id from the above, for example using:
sid = `sed -n 's/.*"sessionid": "\([0-9]*\).*/\1/p'`
Get the session details:
curl 'http://localhost:8080/api/session/${sid}'

Which will become in your script:

curl 'http://localhost:8080/api/session/23'

Sample response:


  "sessionId": 23,

  "reportResolution": 20,

  "startTime": 1494856676000,

  "endTime": 1494856776000,

  "path": "c:\\temp\\",

  "returnCode": "Test passed",

  "failedReason": "Test passed",

  "text": ""

Get data for the session — for example, get the load-size.

The ‘target’ will be ‘Total.Performance Measurements.Load Size’:

curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'target=Total.Performance%20Measurements.Load%20Size&sessionid=23' 'http://localhost:8080/api/render'

Sample response:



    "target": "Load Size",

    "datapoints": [


        5,   //load size

        1494856696000 //timestamp






Generate an Analytics report using the Summary Portfolio for the session:
Curl 'http://localhost:8080/api/analytics?sessionid=23&portfolio=Summary%20Portfolio&format=PDF&name=Report'


21 More articles by David Buch

Dudu has led R&D teams in several high tech companies. Prior to RadView, Dudu was VP R&D at Softlib and Brightinfo, R&D Manager at HP Software, Director of R&D at Mercury Interactive. Dudu is a Bar Ilan University BA magna cum laude graduate in computer science and economics and is a MAMRAM (The Israeli Army Computer Corps) graduate.