Add Tests to Test Suite
API Explorer /multi-tests/{collectionId}/add-tests-executions
To add tests to a test suite, you need to provide a list of testId
s to be added. The sample code to the right is adding 2 tests (testId
1234567
and 2345678
) to the test suite with collectionId
of 12345678
. Replace the testId
s for each test you want to include (as strings) and replace collectionId
12345678
with the collectionId
of your test suite.
The list of tests to be added MUST be in the same
projectId
as the test suite. Use the List Test Suites with the projectId
and platform
used in the test suite to ensure you are only adding tests from that project.
Add Tests to Test Suite
curl 'https://a.blazemeter.com/api/v4/multi-tests/12345678/add-tests-executions' \
-X POST \
-H 'Content-Type: application/json' \
--user 'api_key_id:api_key_secret' \
-d '["1234567", "2345678"]'
Add Tests to Test Suite Request Attributes
Attributes
Add Tests to Test SuiteAdd Tests to Test Suite POST Body (JSON)
[
"1234567",
"2345678"
]
Add Tests to Test Suite Response Attributes
For the full details of all the attributes for the test suite (multi-test), you can visit The Multi-Test Object.
Response200 OK
{
"api_version": 4,
"error": null,
"result": {
"id": 12354678,
"name": "API Created Functional Suite Test",
"description": null,
"collectionType": "functionalTestSuite",
"userId": 123456,
"items": [],
"oldVersionId": null,
"lastRunTime": null,
"draftId": null,
"filesToSplit": [],
"dataFiles": [],
"creatorClientId": "gui",
"testsForExecutions": [
{
"testId": 1234567,
"executions": [
{
"concurrency": 1,
"iterations": 1,
"locations": {
"harbor-58d3b97ff132adc0347b23c6": 1
},
"locationsWeighted": true,
"testId": 1234567,
"scenario": "My Scenario"
}
],
"overrideExecutions": [
{
"iterations": 1,
"executor": "taurus"
}
]
},
{
"testId": 2345678,
"executions": [
{
"concurrency": 1,
"locations": {
"harbor-5e0e68b9568b27689176f3b4": 1
},
"locationsWeighted": true,
"executor": "selenium",
"testId": 2345678,
"capabilities": {
"browserName": "chrome",
"browserVersion": "69",
"blazemeter_videoEnabled": true
},
"scenario": "Scenario 1"
}
],
"overrideExecutions": [
{
"executor": "selenium",
"scenario": "default-scenario",
"locations": {
"harbor-5e0e68b9568b27689176f3b4": 1
},
"capabilities": {
"browserName": "chrome",
"browserVersion": "69",
"blazemeter_videoEnabled": true
}
}
]
}
],
"migratedFromTestCollectionId": null,
"migratedToTestId": null,
"v4MigratedDate": null,
"underMigration": null,
"shouldSendReportEmail": false,
"created": 1591994426,
"updated": 1591994928,
"note": null,
"projectId": 123456,
"lastUpdatedById": null,
"kpiTrackingData": null,
"tests": [
{
"id": 1234567,
"isNewTest": true,
"lastRunTime": 1586202190,
"name": "API Functional Validation Test",
"userId": 123456,
"creatorClientId": "gui",
"overrideExecutions": [
{
"iterations": 1,
"executor": "taurus"
}
],
"executions": [
{
"concurrency": 1,
"iterations": 1,
"locations": {
"harbor-58d3b97ff132adc0347b23c6": 1
},
"locationsWeighted": true,
"scenario": "My Scenario"
}
],
"shouldSendReportEmail": false,
"dependencies": [],
"created": 1586201920,
"updated": 1586202071,
"configuration": {
"type": "functionalApi",
"canControlRampup": false,
"targetThreads": 0,
"enableMockServices": false,
"scriptType": "taurus",
"filename": "blazemeterscript.yaml",
"testMode": "http",
"extraSlots": 0
}
},
{
"id": 2345678,
"isNewTest": true,
"lastRunTime": 1588343976,
"name": "New Validation GUI Functional Test",
"userId": 123456,
"creatorClientId": "gui",
"overrideExecutions": [
{
"executor": "selenium",
"scenario": "default-scenario",
"locations": {
"harbor-5e0e68b9568b27689176f3b4": 1
},
"capabilities": {
"browserName": "chrome",
"browserVersion": "69",
"blazemeter_videoEnabled": true
}
}
],
"executions": [
{
"locationsWeighted": true,
"executor": "selenium",
"scenario": "Scenario 1",
"locations": {
"harbor-5e0e68b9568b27689176f3b4": 1
},
"concurrency": 1,
"capabilities": {
"browserName": "chrome",
"browserVersion": "69",
"blazemeter_videoEnabled": true
}
}
],
"shouldSendReportEmail": false,
"dependencies": [],
"created": 1587414523,
"updated": 1588343968,
"configuration": {
"type": "functionalGui",
"dedicatedIpsEnabled": false,
"canControlRampup": false,
"targetThreads": 0,
"enableMockServices": false,
"scriptType": "taurus",
"filename": "test.yaml",
"testMode": "scriptless",
"extraSlots": 0
},
"fileErrors": []
}
],
"masters": []
},
"request_id": "5ee3ea305c6c4"
}