Update a Test

API Explorer: /tests/{testId}

To update a test, use PATCH to replace the provided parameter values for a test specified by its testId. The ID is assigned when you Create a Test. 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 "name" with a new name value. Another common example would be to update the "configuration" parameter, or the "dependencies" parameter which contains test data.

See the Test Object for the attributes that you can modify.

Update a Test

curl 'https://a.blazemeter.com/api/v4/tests/1234567' \
    -X PATCH \
    -H 'Content-Type: application/json' \
    --user 'api_key_id:api_key_secret' \
    -d '{"name":"New Test Name For API"}'

Update a Test Request Attributes

Attributes

  • name string

    The test name

Update a TestUpdate a Test PATCH Body (JSON)

{
    "name": "New Test Name For API"
}

Update a Test Response Attributes

For the all the supported attributes, see the The Test Object.

Response200 OK

{
    "api_version": 4,
    "error": null,
    "result": {
        "id": 1234567,
        "isNewTest": true,
        "name": "New Test Name For API",
        "userId": 123456,
        "creatorClientId": "api",
        "overrideExecutions": [
            {
                "executor": "jmeter",
                "holdFor": "19m",
                "rampUp": "1m",
                "concurrency": 20,
                "locations": {
                    "us-east-1": 20
                },
                "locationsPercents": {
                    "us-east-1": 100
                },
                "steps": 0
            }
        ],
        "executions": [
            {
                "concurrency": 20,
                "holdFor": "19m",
                "rampUp": "1m",
                "steps": 0,
                "locations": {
                    "us-east-1": 20
                },
                "locationsPercents": {
                    "us-east-1": 100
                },
                "executor": "jmeter",
                "scenario": "default-scenario-6654357"
            }
        ],
        "hasThreadGroupsToOverride": false,
        "hasNonRegularThreadGroup": false,
        "shouldSendReportEmail": true,
        "dependencies": {},
        "created": 1551635668,
        "updated": 1551717656,
        "projectId": 123456,
        "lastUpdatedById": 123456,
        "configuration": {
            "type": "taurus",
            "executionType": "taurusCloud",
            "filename": "MyTest.jmx",
            "testMode": "script",
            "scriptType": "jmeter"
        }
    },
    "test": {
        "id": 1234567,
        "isNewTest": true,
        "name": "New Test Name For API",
        "userId": 123456,
        "creatorClientId": "api",
        "overrideExecutions": [
            {
                "executor": "jmeter",
                "holdFor": "19m",
                "rampUp": "1m",
                "concurrency": 20,
                "locations": {
                    "us-east-1": 20
                },
                "locationsPercents": {
                    "us-east-1": 100
                },
                "steps": 0
            }
        ],
        "executions": [
            {
                "concurrency": 20,
                "holdFor": "19m",
                "rampUp": "1m",
                "steps": 0,
                "locations": {
                    "us-east-1": 20
                },
                "locationsPercents": {
                    "us-east-1": 100
                },
                "executor": "jmeter",
                "scenario": "default-scenario-6654357"
            }
        ],
        "shouldSendReportEmail": true,
		"dependencies": {},
        "created": 1551635668,
        "updated": 1551717656,
        "projectId": 123456,
        "lastUpdatedById": 123456,
        "configuration": {
            "type": "taurus",
            "executionType": "taurusCloud",
            "filename": "MyTest.jmx",
            "testMode": "script",
            "scriptType": "jmeter"
        }
    }
}