Follow

Upload JMX

Description

This API enables you to upload the JMX script file and any other test related file, e.g CSV, JAR etc. This function includes parameters to identify both the user and the test

 

API v4

URL

https://a.blazemeter.com/api/v4/tests/<test_id>/files

Request Parameters

Parameter Description
Api Key Identifies the user. How to get the API Key?
Test ID Identifies the test. How to get the Test ID?

cURL

curl -X POST -F "file=@<path_to_file>/file.jmx" https://a.blazemeter.com/api/v4/tests/<test_id>/files -H "x-api-key: 998a2hk7d26be74xxxxx"

The Test Object

The Test object contains the following parameters:

Parameter Description Modifiable
id The unique identifier of the test. The 'Test ID'.
name The verbal identifier of the test
userId The unique identifier of the user
created The time the test was started at
updated The time the test was last updated
location The Geolocation of the load generators. Download list here.
type Can be a Jmeter, URL list or Webdriver Test
concurrency Max number of threads active concurrently per engine
dedicatedIpsEnabled True will use the Dedicated IPs you've purchased. More info
.splitCSV.enabled True will split the CSV/s . More info
reportEmail.enabled True if you like to receive an Email at test's end
filename the name of the JMX script uploaded
jmeter.version The Jmeter version used to run this test, e.g '3.1'
rampup The timeframe in which the load will be increased from 0 to the Max concurrent users set
iterations The number of iterations the test will run until finished. Infinite iteration presented as '-1'
duration The period of time for which the test will run until shut down

Example Response

{
    "api_version": 4,
    "error": null,
    "result": {
        "id": 5373510,
        "name": "MyTest1",
        "draftId": "td_2017_01_10_18_08_55_136992_4739",
        "userId": 136992,
        "lastRunTime": 1484668793,
        "created": 1484064571,
        "updated": true,
        "configuration": {
            "location": "us-east-1",
            "duration": 9,
            "type": "jmeter",
            "concurrency": 201,
            "dedicatedIpsEnabled": false,
            "javaVersion": "1.8",
            "plugins": {
                "remoteControl": [
                    {
                        "key": "key1",
                        "value": "value2"
                    }
                ],
                "splitCSV": {
                    "enabled": false
                },
                "reportEmail": {
                    "enabled": false
                },
                "jmeter": {
                    "filename": "Dummy.jmx",
                    "version": "3.0",
                    "consoleArgs": "",
                    "enginesArgs": "",
                    "override": {
                        "rampup": 300,
                        "iterations": -1,
                        "duration": 9
                    }
                }
            }
        }
    }

 

IMPORTANT: To ensure your data files, .CSV /.TXT, are visible in the "Upload" window, avoid naming these with pattern <sample.csv>. Some examples to avoid: test-sample.csv, file-sample.csv, data-sample.txt.

 

API v2 

URL

https://a.blazemeter.com:443/api/latest/tests/<test_id>/files

Request Parameters

Parameter Description
Api Key Identifies the user. How to get the API Key?
Test ID Identifies the test. How to get the Test ID?

cURL

curl -X POST -F "file=@<path_to_file>/file.jmx" https://a.blazemeter.com:443/api/latest/tests/<test_id>/files -H "x-api-key: 998a2hk7d26be74xxxxx"

The Test Object

The Test object contains the following parameters:

Parameter Description Modifiable
id The unique identifier of the test. The 'Test ID'.
name The verbal identifier of the test
userId The unique identifier of the user
created The time the test was started at
updated The time the test was last updated
location The Geolocation of the load generators. Download list here.
type Can be a Jmeter, URL list or Webdriver Test
concurrency Max number of threads active concurrently per engine
dedicatedIpsEnabled True will use the Dedicated IPs you've purchased. More info
.splitCSV.enabled True will split the CSV/s . More info
reportEmail.enabled True if you like to receive an Email at test's end
filename the name of the JMX script uploaded
jmeter.version The Jmeter version used to run this test, e.g '3.1'
rampup The timeframe in which the load will be increased from 0 to the Max concurrent users set
iterations The number of iterations the test will run until finished. Infinite iteration presented as '-1'
duration The period of time for which the test will run until shut down

Example Response

{
    "api_version": 2,
    "error": null,
    "result": {
        "id": 5075331,
        "name": "MyJmeterTest",
        "userId": 67295,
        "created": 1434460397,
        "updated": true,
        "configuration": {
            "location": "us-west-1",
            "type": "jmeter",
            "concurrency": 80,
            "dedicatedIpsEnabled": false,
            "plugins": {
                "splitCSV": {
                    "enabled": false
                },
                "reportEmail": {
                    "enabled": true
                },
                "jmeter": {
                    "filename": "file.jmx",
                    "version": "3.1",
                    "override": {
                        "rampup": 150,
                        "iterations": -1,
                        "duration": 25
                    }
                }
            }
        }
    }
}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.