https://www.redline13.com/Api/LoadTest
This API allows you to start any load test. Load test paramters are grouped into three categories
The result of a succesful API call is JSON document with one parameter
loadTestId - with the value of of the load test id.
Example of executing load tests through an API via Curl are available at the end of this page.
Used for all test types.
Parameter | Required | Details |
---|---|---|
testType |
Yes |
Use the following depending on test type.
|
name |
No |
Optional test name. |
desc |
No |
Optional description of the test. |
storeOutput |
No | Should the output be stored? T or F . If output is stored, we will also calculate percentiles. |
Parameter | Required | Details | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
Yes |
The URL to test. Be sure to include http:// or https://. |
||||||||||||
numUsers |
Yes |
Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis. |
||||||||||||
numIterations |
Yes |
Number of iterations that each user will simulate. |
||||||||||||
rampUpSec |
No |
Ramp up time in seconds. |
||||||||||||
minDelayMs |
Yes |
Minimum delay in milliseconds before loading the URL for reach request. |
||||||||||||
maxDelayMs |
Yes |
Maximum delay in milliseconds before loading the URL for reach request. |
||||||||||||
loadResources |
No |
Should resources (images, CSS, and javascript) in the returned HTML be loaded? |
||||||||||||
params |
No |
This field is an array of GET, POST, BODY, or HEADER parameters that you want to include in the requests to the URL entered. Each row of the array includes
To post 2 parameters, you should use the following names for the parameters: |
Parameter | Required | Details |
---|---|---|
file |
Yes |
Raw file contents of custom test. |
extras[] |
No |
Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files. |
split[] |
No |
For each item list the filename (not the path) from extras[] which you would like Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started. Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line. |
numUsers |
Yes |
Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis. |
loadResources |
No |
Should resources (images, CSS, and javascript) in the returned HTML be loaded? |
lang |
Yes |
Programming language to use. |
plugin |
No |
Array of plugin names. plugin[0], plugin[1] |
[plugin-name]_[KEY] |
No |
Every plugin defines its own parameters and they can be passed through with plugin-name_key=value |
Parameter | Required | Details |
---|---|---|
file |
Yes |
Raw file contents of JMeter test. |
extras[] |
No |
Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files. |
split[] |
No |
For each item list the filename (not the path) from extras[] which you would like Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started. Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line. |
numServers |
Yes |
Number of servers to use in the test. This must equal the sum of the total servers specified on a per server basis. |
version |
Yes |
Accepted values are
|
opts |
No |
Specify JMeter Options as -Jkey=value -Jkey=value |
jvm_args |
No | Specify JVM Options such as -Xms256m -Xmx256m |
plugin |
No | Array of plugin names. plugin[0], plugin[1] |
[plugin-name]_[KEY] |
No | Every plugin defines its own parameters and they can be passed through with plugin-name_key=value |
webdriver-width |
No | if webdriver plugin is enabled, Screen Width for simulated browser |
webdriver-height |
No | if webdriver plugin is enabled, Screen Height for simulated browser |
webdriver-depth |
No | if webdriver plugin is enabled, Screen Depth for simulated browser |
Parameter | Required | Details |
---|---|---|
file |
Yes |
Raw file contents of Gatling Test. |
extras[] |
No |
Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files. |
split[] |
No |
For each item list the filename (not the path) from extras[] which you would like Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started. Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line. |
numServers |
Yes |
Number of servers to use in the test. This must equal the sum of the total servers specified on a per server basis. |
version |
Yes |
Accepted values are
|
opts |
No |
Specify Options as -Dkey=value -Dkey=value |
plugin |
No | Array of plugin names. plugin[0], plugin[1] |
[plugin-name]_[KEY] |
No | Every plugin defines its own parameters and they can be passed through with plugin-name_key=value |
Parameter | Required | Details |
---|---|---|
file |
Yes |
Raw file contents of LOG file. |
log_format |
No |
The log file pattern, such as '%h %l %u %t "%r" %>s %b' |
numUsers |
Yes |
Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis. |
url |
No |
Specify Base URL for log file replay, http(s)://my.example.com/ |
numIterations |
Yes |
Number of iterations that each user will simulate. |
rampUpSec |
No |
Ramp up time in seconds. |
minDelayMs |
Yes |
Minimum delay in milliseconds before loading the URL for reach request. |
maxDelayMs |
Yes |
Maximum delay in milliseconds before loading the URL for reach request. |
loadResources |
No |
Should resources (images, CSS, and javascript) in the returned HTML be loaded? |
Parameter | Required | Details |
---|---|---|
keyPairId |
Yes |
Key pair ID. This ID can be found here once you have a key setup. |
servers |
Yes |
This field is an array of server details. Each row of the array includes
Not that you can only post one row for each location/size pair. |
curl https://www.redline13.com/Api/LoadTest \ -H "X-Redline-Auth: YOUR_API_KEY" \ -F testType=jmeter-test \ -F name=JMeterFromAPI \ -F "file=@/Downloads/MyJmeterTest.jmx" \ -F numServers=1 \ -F storeOutput=T \ -F servers[0][location]=us-east-1 \ -F servers[0][size]=m6i.large \ -F servers[0][num]=1 \ -F servers[0][onDemand]=T \ -F servers[0][usersPerServer]=1 \ -F keyPairId=YOUR_KEY_PAIR_ID
curl https://www.redline13.com/Api/LoadTest \ -H "X-Redline-Auth: YOUR_API_KEY" \ -F testType=replay \ -F name=LoadTestFromAPI \ -F numServers=1 \ -F storeOutput=T \ -F servers[0][location]=us-east-1 \ -F servers[0][size]=m6i.large \ -F servers[0][num]=1 \ -F servers[0][onDemand]=T \ -F servers[0][usersPerServer]=1 \ -F keyPairId=YOUR_KEY_PAIR_ID_OR_DO_NOT_INCLUDE_FOR_DEFAULT \ -F numUsers=1 \ -F url=https://www.yahoo.com/ \ -F log_format='%h %l %u %t "%r" %>s %b' \ -F minDelayMs=500 \ -F maxDelayMs=1000 \ -F numIterations=5 \ -F "file=@/PATH_TO_YOUR_LOGFILE/some_log_file.log"