Update a Test

API Explorer: /tests/{testId}

To update a test, use PUT to replace the provided parameter values for a test specified by its testId. If you do not know the testId, use List Tests to return a list of all your existing tests to identify the ID.

The sample code shown here updates a test with an ID of 1234567 (the 1234567 is contained in the URL) and it replaces the old parameter "configuration" with a new "configuration" that uses the MyTest.jmx script. Another common example would be to update the "dependencies" parameter which contains test data. See The API Functional Test Object, and The GUI Functional Test Object for all the parameters that you can modify.

Update a Test

curl 'https://a.blazemeter.com/api/v4/tests/1234567' \
    -X PUT \
    -H 'Content-Type: application/json' \
    --user 'api_key_id:api_key_secret' \
    -d '{"configuration":{"filename":"MyTest.jmx"}}'

Update a Test Request Attributes

Attributes

Update a TestUpdate a Test PUT Body (JSON)

{
  "configuration": {
    "filename": "MyTest.jmx"
    }
  }
}

Update Test Response Attributes

See the The Test Object response attributes for a detailed breakdown of the response attributes.

Response200 OK

{
    "api_version": 4,
    "error": null,
    "result": {
        "id": 1234567,
        "isNewTest": true,
        "name": "API Created API Functional Test",
        "userId": 123456,
        "creatorClientId": "api",
        "overrideExecutions": [
            {
                "iterations": 1
            }
        ],
        "executions": [
            {
                "iterations": 1,
                "scenario": "default-scenario-7552536"
            }
        ],
        "shouldSendReportEmail": false,
        "dependencies": [],
        "created": 1577382114,
        "updated": 1577389061,
        "projectId": 123456,
        "lastUpdatedById": 123456,
        "configuration": {
            "type": "functionalApi",
            "canControlRampup": false,
            "targetThreads": 0,
            "scriptType": "jmeter",
            "filename": "MyTest.jmx",
            "testMode": "script",
            "plugins": {
                "jmeter": {
                    "version": "auto"
                }
            }
        }
    },
    "request_id": "5e050c057ae17",
    "test": {
        "id": 1234567,
        "isNewTest": true,
        "name": "API Created API Functional Test",
        "userId": 123456,
        "creatorClientId": "api",
        "overrideExecutions": [
            {
                "iterations": 1
            }
        ],
        "executions": [
            {
                "iterations": 1,
                "scenario": "default-scenario-7552536"
            }
        ],
        "shouldSendReportEmail": false,
        "dependencies": [],
        "created": 1577382114,
        "updated": 1577389061,
        "projectId": 123456,
        "lastUpdatedById": 123456,
        "configuration": {
            "type": "functionalApi",
            "canControlRampup": false,
            "targetThreads": 0,
            "scriptType": "jmeter",
            "filename": "MyTest.jmx",
            "testMode": "script",
            "plugins": {
                "jmeter": {
                    "version": "auto"
                }
            }
        }
    }
}