Create a Test

API Explorer: /tests

To create a test:

  1. Create the test object with a POST to the test endpoint (see sample create GUI Functional test request).
  2. Capture the testId returned as id from the response.
Starting February 2022, the API Functional testing feature has been deprecated. Depending on your subscription plan, you may still be able to run existing tests but can no longer create new ones. Please use BlazeMeter API Monitoring to create and run your API Functional Tests going forward.

For a full breakdown of the GUI Functional test, see The GUI Functional Test Object.

This testId will be used as a parameter to identify the test.

Create a GUI Functional Test Request Attributes

Attributes

  • namestring

    required

    The test name

  • projectIdinteger

    required

    The projectId you will place the test in

  • isNewTestboolean

    Signifies this is a new test

  • shouldSendReportEmailboolean

    Denotes if an email will be sent after the test runs

  • configurationobject

    Contains all the advanced BlazeMeter related configurations (i.e. running file, JMeter properties, etc.)

  • overrideExecutionsarray

    The test settings used when running the test in BlazeMeter

Create a GUI Functional Test

curl 'https://a.blazemeter.com/api/v4/tests' \
    -X POST \
    -H 'Content-Type: application/json' \
    --user 'api_key_id:api_key_secret' \
    -d '{"name":"API Created GUI Functional Test","projectId":123456,"isNewTest":true,"shouldSendReportEmail":false,"configuration":{"type":"functionalGui","testMode":"script"},"overrideExecutions":[{"iterations":1}]}'

Create a TestCreate a GUI Functional Test POST Body (JSON)

{
    "name": "API Created GUI Functional Test",
    "projectId": 123456,
    "isNewTest": true,
    "shouldSendReportEmail": false,
    "configuration": {
        "type": "functionalGui",
        "testMode":"script"
    },
    "overrideExecutions": [
        {
            "iterations": 1
        }
    ]
}

Create a GUI Functional Test Response Attributes

For the full details of all the attributes for the GUI Functional Test, you can visit The GUI Functional Test Object.

Response201 Created

{
    "api_version": 4,
    "error": null,
    "result": {
        "id": 1234567,
        "name": "API Created GUI Functional Test",
        "isNewTest": true,
        "userId": 123456,
        "created": 1577463923,
        "updated": 1577463923,
        "creatorClientId": "api",
        "overrideExecutions": [
            {
                "iterations": 1
            }
        ],
        "executions": [],
        "shouldSendReportEmail": false,
        "projectId": 123456,
        "lastUpdatedById": 123456,
        "configuration": {
            "type": "functionalGui",
            "filename": "MyTest.jmx",
            "canControlRampup": false,
            "targetThreads": 0
        }
    },
    "request_id": "5e063072e1786"
}