Testkube Agent /test-suites operations
Testkube API (1.0.0)
Download OpenAPI specification:Download
Testkube provides a Kubernetes-native framework for test definition, execution and results
Create new test suite
Create new test suite action
Request Body schema: required
test details body
name required | string object name |
namespace required | string object kubernetes namespace |
description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
schedule | string schedule to run test suite |
repeats | integer Default: 1 |
created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
Response samples
- 201
- 400
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
Get all test suites
Returns array of test suites
query Parameters
selector | string Labels to filter by |
textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
]
Delete test suites
Deletes all or labeled test suites
query Parameters
selector | string Labels to filter by |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test suite by ID
Returns test suite with given name
path Parameters
id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
Update test suite
Update test based on test suite content or git based data
path Parameters
id required | string unique id of the object |
Request Body schema: required
test suite details body
name required | string object name |
namespace | string object kubernetes namespace |
description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
schedule | string schedule to run test suite |
repeats | integer Default: 1 |
created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
Response samples
- 200
- 400
- 404
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
Delete test suite
Deletes a test suite
path Parameters
id required | string unique id of the object |
query Parameters
skipDeleteCRD | boolean Default: false dont delete CRD |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test suite metrics
Gets test suite metrics for given tests executions, with particular execution status and timings
path Parameters
id required | string unique id of the object |
query Parameters
last | integer Default: 7 last N days to show |
limit | integer Default: 7 limit records count same as pageSize |
Responses
Response samples
- 200
- 500
{- "passFailRatio": 50,
- "executionDurationP50": "7m2.71s",
- "executionDurationP50ms": 422,
- "executionDurationP90": "7m2.71s",
- "executionDurationP90ms": 422,
- "executionDurationP95": "7m2.71s",
- "executionDurationP95ms": 422,
- "executionDurationP99": "7m2.71s",
- "executionDurationP99ms": 422,
- "totalExecutions": 2,
- "failedExecutions": 1,
- "executions": [
- {
- "executionId": "string",
- "duration": "string",
- "durationMs": 0,
- "status": "string",
- "name": "string",
- "startTime": "2019-08-24T14:15:22Z"
}
]
}
List tests for test suite
List available tests for test suite
path Parameters
id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true,
- "useDefaultStorageClassName": true,
- "sidecarScraper": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string",
- "disableWebhooks": [
- true,
- false
]
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}
]
Abort all executions of a test suite
Abort all test executions of a test suite
path Parameters
id required | string unique id of the object |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Starts new test suite execution
New test suite execution returns new execution details on successful execution start
path Parameters
id required | string unique id of the object |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
last | integer Default: 7 last N days to show |
testSuiteExecutionName | string test suite execution name stated the test suite execution |
Request Body schema: application/jsonrequired
body passed to configure execution
name | string test execution custom name |
number | integer test suite execution number |
namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
sync | boolean whether to start execution sync or async |
httpProxy | string http proxy for executor containers |
httpsProxy | string https proxy for executor containers |
timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
jobTemplate | string job template extensions |
jobTemplateReference | string name of the template resource |
cronJobTemplate | string cron job template extensions |
cronJobTemplateReference | string name of the template resource |
scraperTemplate | string scraper template extensions |
scraperTemplateReference | string name of the template resource |
pvcTemplate | string pvc template extensions |
pvcTemplateReference | string name of the template resource |
concurrencyLevel | integer <int32> number of tests run in parallel |
testSuiteExecutionName | string test suite execution name started the test suite execution |
disableWebhooks | boolean Default: false whether webhooks on the execution of this test suite are disabled |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}
Response samples
- 201
- 400
- 404
- 500
- 502
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}
Get all test suite executions
Returns array of all available test suite executions
path Parameters
id required | string unique id of the object |
query Parameters
pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
page | integer Default: 0 the page index to start at |
status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}
Get test suite execution
Returns test suite execution with given executionID
path Parameters
id required | string unique id of the object |
executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true,
- "useDefaultStorageClassName": true,
- "sidecarScraper": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string",
- "disableWebhooks": [
- true,
- false
]
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "disableWebhooks": [
- true,
- false
]
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "disableWebhooks": [
- true,
- false
]
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true,
- "useDefaultStorageClassName": true,
- "sidecarScraper": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string",
- "disableWebhooks": [
- true,
- false
]
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string",
- "disableWebhooks": [
- true,
- false
]
}
Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
id required | string unique id of the object |
executionID required | string unique id of the object execution |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
id required | string unique id of the object |
executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}