Testkube Control Plane ../tests operations
Testkube Pro API (cloud-api/1.10.51)
Download OpenAPI specification:Download
API for Testkube Pro
List tests
List available tests
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
query Parameters
selector | string Example: selector=kubernetes.io/app=demo Only workflow executions with given status are included in this time series chart. |
textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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"
}
}
}
]
Create new test
Create new test based on file content, uri or git based data
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
Request Body schema: required
test details body
name | string test name |
namespace | string test namespace |
description | string test description |
type | string test type |
object (TestContent) | |
source | string reference to test source resource |
created | string <date-time> |
object test labels | |
schedule | string schedule to run test |
readOnly | boolean if test is offline and cannot be executed |
uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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"
}
}
}
Response samples
- 201
- 400
- 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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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"
}
}
}
Delete tests
Deletes all or labeled tests
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
query Parameters
selector | string Example: selector=kubernetes.io/app=demo Only workflow executions with given status are included in this time series chart. |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test
Gets the specified test
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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"
}
}
}
Delete test
Deletes a test
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
query Parameters
skipDeleteExecutions | boolean Default: false dont delete executions |
skipDeleteCRD | boolean Default: false dont delete CRD |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Update test
Update test based on test content or git based data
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
Request Body schema: required
test details body
name | string test name |
namespace | string test namespace |
description | string test description |
type | string test type |
object (TestContent) | |
source | string reference to test source resource |
created | string <date-time> |
object test labels | |
schedule | string schedule to run test |
readOnly | boolean if test is offline and cannot be executed |
uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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"
}
}
}
Response samples
- 200
- 400
- 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": {
- "app": "backend",
- "env": "prod"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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
Abort all test executions
path Parameters
environmentId required | string environmentID |
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",
}
]
Get all test executions
Returns array of all available test executions
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
query Parameters
last | integer Default: 7 last N days to show |
pageSize | integer The desired page size for this list, or a default page size when absent. |
page | integer Default: 0 the page index to start at |
status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" 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
- 404
- 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": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "app": "backend",
- "env": "prod"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
Starts new test execution
New test execution returns new execution details on successful execution start
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
testExecutionName | string test execution name stated the test execution |
Request Body schema: application/jsonrequired
body passed to configure execution
id | string <bson objectId> execution id |
name | string test execution custom name |
testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
number | integer test execution number |
object test execution labels | |
namespace | string test kubernetes namespace ("testkube" when not set) |
isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
testSecretUUID | string test secret uuid |
testSuiteSecretUUID | string test suite secret uuid, if it's run as a part of test suite |
command | Array of strings executor image command |
args | Array of strings additional executor binary arguments |
args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
sync | boolean whether to start execution sync or async |
httpProxy | string http proxy for executor containers |
httpsProxy | string https proxy for executor containers |
negativeTest | boolean whether to run test as negative test |
isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
uploads | Array of strings list of file paths that need to be copied into the test from uploads |
bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
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 |
object (TestContentRequest) test content request body | |
preRunScript | string script to run before test execution |
postRunScript | string script to run after test execution |
executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
sourceScripts | boolean run scripts using source command (container executor only) |
scraperTemplate | string scraper template extensions |
scraperTemplateReference | string name of the template resource |
pvcTemplate | string pvc template extensions |
pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
testExecutionName | string test execution name started the test execution |
downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
executionNamespace | string namespace for test execution (Pro edition only) |
disableWebhooks | boolean Default: false whether webhooks on this execution are disabled |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "prefix": "some-",
- "users": "3"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "prefix": "some-",
- "record": "true"
}, - "secretEnvs": {
- "secret_Key_name2": "secret-name",
- "secret_key_name1": "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
]
}
Response samples
- 201
- 400
- 404
- 500
- 502
{- "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"
}
}
Get test execution
Returns execution with given executionID
path Parameters
environmentId required | string environmentID |
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": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "prefix": "some-",
- "record": "true"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}, - "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}
}, - "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": {
- "app": "backend",
- "env": "prod"
}, - "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
]
}
Aborts execution
Aborts execution with given executionID
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test metrics
Gets test metrics for given tests executions, with particular execution status and timings
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
query Parameters
last | integer Default: 7 last N days to show |
limit | integer limit queries for list of resources |
Responses
Response samples
- 200
- 500
- 502
{- "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"
}
]
}