Create a Test
API Explorer: /tests
To create a test:
- Create the test object with a POST to the test endpoint (see sample create GUI Functional test request).
- Capture the
testId
returned asid
from the response.
For a full breakdown of the GUI Functional test, see The GUI Functional Test Object.
testId
will be used as a parameter to identify the test.Create a GUI Functional Test Request Attributes
Attributes
-
name
stringrequired
The test name
-
projectId
integerrequired
The
projectId
you will place the test in -
isNewTest
booleanSignifies this is a new test
-
shouldSendReportEmail
booleanDenotes if an email will be sent after the test runs
-
configuration
objectContains all the advanced BlazeMeter related configurations (i.e. running file, JMeter properties, etc.)
Show/Hide Child Attributes-
type
stringrequired
The test type. Must be,
functionalGui
-
testMode
stringrequired
The test mode this test will use. Can be the following values:
script
- Use when uploading your own script (i.e. Taurus YAML configuration, JMeter script, etc.)http
- Used for URL tests in BlazeMeter
-
-
overrideExecutions
arrayThe test settings used when running the test in BlazeMeter
Show/Hide Child Attributes-
iterations
integerThe number of iterations to run
-
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"
}