Skip to main content
New to Testkube? Unleash the power of cloud native testing in Kubernetes with Testkube. Get Started >

Testkube Agent /executions operations

Testkube API (1.0.0)

Download OpenAPI specification:Download

E-mail: testkube@kubeshop.io License: MIT

Testkube provides a Kubernetes-native framework for test definition, execution and results

Starts new test executions

New test executions returns new executions details on successful executions start

query Parameters
namespace
string
Default: "testkube"

Namespace of the object

selector
string

Labels to filter by

executionSelector
string

Execution Labels to add to executions

concurrency
integer
Default: 10
Request Body schema: application/json
required

body passed to configure executions

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

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

Content type
application/json
{
  • "id": "62f395e004109209b50edfc1",
  • "name": "testing with 1000 users",
  • "testSuiteName": "test-suite1",
  • "number": 0,
  • "executionLabels": {
    },
  • "namespace": "testkube",
  • "isVariablesFileUploaded": false,
  • "variablesFile": "string",
  • "variables": {
    },
  • "command": [
    ],
  • "args": [
    ],
  • "args_mode": "append",
  • "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
  • "imagePullSecrets": [
    ],
  • "envs": {
    },
  • "secretEnvs": {
    },
  • "sync": true,
  • "httpProxy": "user:pass@my.proxy.server:8080",
  • "httpsProxy": "user:pass@my.proxy.server:8081",
  • "negativeTest": false,
  • "isNegativeTestChangedOnRun": false,
  • "activeDeadlineSeconds": 1,
  • "uploads": [
    ],
  • "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
  • "artifactRequest": {
    },
  • "jobTemplate": "string",
  • "jobTemplateReference": "string",
  • "cronJobTemplate": "string",
  • "cronJobTemplateReference": "string",
  • "contentRequest": {
    },
  • "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
  • "postRunScript": "sleep 30",
  • "executePostRunScriptBeforeScraping": true,
  • "sourceScripts": true,
  • "scraperTemplate": "string",
  • "scraperTemplateReference": "string",
  • "pvcTemplate": "string",
  • "pvcTemplateReference": "string",
  • "envConfigMaps": [
    ],
  • "envSecrets": [
    ],
  • "runningContext": {
    },
  • "testExecutionName": "string",
  • "downloadArtifactExecutionIDs": [
    ],
  • "downloadArtifactTestNames": [
    ],
  • "slavePodRequest": {
    },
  • "executionNamespace": "string",
  • "disableWebhooks": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Get all test executions

Returns array of test executions

query Parameters
test
string
Default: ""

test namespaced name to filter

type
string
Default: ""

object type

textSearch
string
Default: ""

text to search in name and test name

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 (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

selector
string

Labels to filter by

Responses

Response samples

Content type
application/json
{
  • "totals": {
    },
  • "filtered": {
    },
  • "results": [
    ]
}

Get test execution by ID

Returns execution with given executionID

path Parameters
executionID
required
string

unique id of the object execution

Responses

Response samples

Content type
application/json
{
  • "id": "62f395e004109209b50edfc4",
  • "testName": "example-test",
  • "testSuiteName": "test-suite1",
  • "testNamespace": "testkube",
  • "testType": "postman/collection",
  • "name": "test-suite1-example-test-1",
  • "number": 1,
  • "envs": {
    },
  • "command": [
    ],
  • "args": [
    ],
  • "args_mode": "append",
  • "variables": {
    },
  • "isVariablesFileUploaded": false,
  • "variablesFile": "string",
  • "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
  • "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
  • "content": {
    },
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "duration": "88s",
  • "durationMs": 10000,
  • "executionResult": {
    },
  • "labels": {
    },
  • "uploads": [
    ],
  • "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
  • "artifactRequest": {
    },
  • "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
  • "postRunScript": "sleep 30",
  • "executePostRunScriptBeforeScraping": true,
  • "sourceScripts": true,
  • "runningContext": {
    },
  • "containerShell": "/bin/sh",
  • "testExecutionName": "string",
  • "downloadArtifactExecutionIDs": [
    ],
  • "downloadArtifactTestNames": [
    ],
  • "slavePodRequest": {
    },
  • "executionNamespace": "string",
  • "disableWebhooks": [
    ]
}

Get execution's artifacts by ID

Returns artifacts of the given executionID

path Parameters
id
required
string

unique id of the object

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get execution's logs by ID

Returns logs of the given executionID

path Parameters
id
required
string

unique id of the object

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get execution's logs by ID version 2

Returns logs of the given executionID version 2

path Parameters
id
required
string

unique id of the object

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Download artifact

Download the artifact file from the given execution

path Parameters
id
required
string

unique id of the object

filename
required
string

filename of the object usually used for artifacts

Responses

Response samples

Content type
application/problem+json
[]

Download artifact archive

Download the artifact archive from the given execution

path Parameters
id
required
string

unique id of the object

query Parameters
mask
string

mask to filter files

Responses

Response samples

Content type
application/problem+json
[]