API Reference
Packages
tests.testkube.io/v1
Package v1 contains API Schema definitions for the testkube v1 API group
Resource Types
- Script
- ScriptList
- Template
- TemplateList
- Test
- TestExecution
- TestExecutionList
- TestList
- TestSource
- TestSourceList
- TestSuite
- TestSuiteExecution
- TestSuiteExecutionList
- TestSuiteList
- TestTrigger
- TestTriggerList
ArgsModeType
Underlying type: string
ArgsModeType defines args mode type
Validation:
- Enum: [append override replace]
Appears in:
Field | Description |
---|---|
append | ArgsModeTypeAppend for append args mode |
override | ArgsModeTypeOverride for override args mode |
replace | ArgsModeTypeReplace for replace args mode |
ArtifactRequest
artifact request body with test artifacts
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
storageClassName string | artifact storage class name for container executor | ||
volumeMountPath string | artifact volume mount path for container executor | ||
dirs string array | artifact directories for scraping | ||
masks string array | regexp to filter scraped artifacts, single or comma separated | ||
storageBucket string | artifact bucket storage | ||
omitFolderPerExecution boolean | don't use a separate folder for execution artifacts | ||
sharedBetweenPods boolean | whether to share volume between pods | ||
useDefaultStorageClassName boolean | whether to use default storage class name | ||
sidecarScraper boolean | run scraper as pod sidecar container |
EnvReference
Reference to env resource
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
reference LocalObjectReference | |||
mount boolean | whether we shoud mount resource | ||
mountPath string | where we shoud mount resource | ||
mapToVariables boolean | whether we shoud map to variables from resource |
Execution
test execution
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
id string | execution id | ||
testName string | unique test name (CRD Test name) | ||
testSuiteName string | unique test suite name (CRD Test suite name), if it's run as a part of test suite | ||
testNamespace string | test namespace | ||
testType string | test type e.g. postman/collection | ||
name string | execution name | ||
number integer | execution number | ||
envs object (keys:string, values:string) | Environment variables passed to executor. Deprecated: use Basic Variables instead | ||
command string array | executor image command | ||
args string array | additional arguments/flags passed to executor binary | ||
args_mode ArgsModeType | usage mode for arguments | Enum: [append override replace] | |
variables object (keys:string, values:Variable) | |||
isVariablesFileUploaded boolean | in case the variables file is too big, it will be uploaded to storage | ||
variablesFile string | variables file content - need to be in format for particular executor (e.g. postman envs file) | ||
testSecretUUID string | test secret uuid | ||
testSuiteSecretUUID string | test suite secret uuid, if it's run as a part of test suite | ||
content TestContent | |||
startTime Time | test start time | ||
endTime Time | test end time | ||
duration string | test duration | ||
durationMs integer | test duration in milliseconds | ||
executionResult ExecutionResult | |||
labels object (keys:string, values:string) | test and execution labels | ||
uploads string array | list of file paths that need to be copied into the test from uploads | ||
bucketName string | minio bucket name to get uploads from | ||
artifactRequest ArtifactRequest | |||
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) | ||
runningContext RunningContext | |||
containerShell string | shell used in container executor | ||
testExecutionName string | test execution name started the test execution | ||
slavePodRequest PodRequest | |||
executionNamespace string | namespace for test execution (Pro edition only) | ||
disableWebhooks boolean | whether webhooks should be disabled for this execution |
ExecutionRequest
test execution request body
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
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 | ||
executionLabels object (keys:string, values:string) | test execution labels | ||
namespace string | test kubernetes namespace ("testkube" when not set) | ||
variablesFile string | variables file content - need to be in format for particular executor (e.g. postman envs file) | ||
isVariablesFileUploaded boolean | |||
variables object (keys:string, values:Variable) | |||
testSecretUUID string | test secret uuid | ||
testSuiteSecretUUID string | test suite secret uuid, if it's run as a part of test suite | ||
args string array | additional executor binary arguments | ||
argsMode ArgsModeType | usage mode for arguments | Enum: [append override replace] | |
command string array | executor binary command | ||
image string | container executor image | ||
imagePullSecrets LocalObjectReference array | container executor image pull secrets | ||
envs object (keys:string, values:string) | Environment variables passed to executor. Deprecated: use Basic Variables instead | ||
secretEnvs object (keys:string, values:string) | 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 | negative test will fail the execution if it is a success and it will succeed if it is a failure | ||
activeDeadlineSeconds integer | Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. | ||
artifactRequest ArtifactRequest | |||
jobTemplate string | job template extensions | ||
cronJobTemplate string | cron job template extensions | ||
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 | ||
envConfigMaps EnvReference array | config map references | ||
envSecrets EnvReference array | secret references | ||
runningContext RunningContext | |||
slavePodRequest PodRequest | |||
executionNamespace string | namespace for test execution (Pro edition only) | ||
disableWebhooks boolean | whether webhooks should be called on execution |
ExecutionResult
execution result returned from executor
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
errorMessage string | error message when status is error, separate to output as output can be partial in case of error | ||
steps ExecutionStepResult array | execution steps (for collection of requests) | ||
reports ExecutionResultReports |
ExecutionResultReports
Underlying type: struct{Junit string "json:"junit,omitempty""}
Appears in:
ExecutionStepResult
execution result data
Appears in:
ObjectRef
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
namespace string | object kubernetes namespace | ||
name string | object name |
PodRequest
pod request body
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
resources PodResourcesRequest | |||
podTemplate string | pod template extensions | ||
podTemplateReference string | name of the template resource |
PodResourcesRequest
Underlying type: struct{Requests *ResourceRequest "json:"requests,omitempty""; Limits *ResourceRequest "json:"limits,omitempty""}
pod resources request specification
Appears in:
Repository
Repository represents VCS repo, currently we're handling Git only
Appears in:
RepositoryParameters
repository parameters for tests in git repositories
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
branch string | branch/tag name for checkout | ||
commit string | commit id (sha) for checkout | ||
path string | if needed we can checkout particular path (dir or file) in case of BIG/mono repositories | ||
workingDir string | if provided we checkout the whole repository and run test from this directory |
RunningContext
running context for test or test suite execution
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type RunningContextType | One of possible context types | Enum: [user-cli user-ui testsuite testtrigger scheduler testexecution testsuiteexecution] | |
context string | Context value depending from its type |
RunningContextType
Underlying type: string
RunningContextType defines running context type
Validation:
- Enum: [user-cli user-ui testsuite testtrigger scheduler testexecution testsuiteexecution]
Appears in:
Field | Description |
---|---|
user-cli | |
user-ui | |
testsuite | |
testtrigger | |
scheduler | |
testexecution | |
testsuiteexecution | |
`` |
Script
Script is the Schema for the scripts API
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | tests.testkube.io/v1 | ||
kind string | Script | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ScriptSpec |
ScriptList
ScriptList contains a list of Script
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | tests.testkube.io/v1 | ||
kind string | ScriptList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items Script array |
ScriptSpec
ScriptSpec defines the desired state of Script
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type string | script type | ||
name string | script execution custom name | ||
params object (keys:string, values:string) | execution params passed to executor | ||
content string | script content as string (content depends from executor) | ||
input-type string | script content type can be: - direct content - created from file, - git repo directory checkout in case when test is some kind of project or have more than one file, | ||
repository Repository | repository details if exists | ||
tags string array |
SuiteExecution
SuiteExecutions data
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
id string | execution id | ||
name string | execution name | ||
testSuite ObjectRef | |||
envs object (keys:string, values:string) | Environment variables passed to executor. Deprecated: use Basic Variables instead | ||
variables object (keys:string, values:Variable) | |||
secretUUID string | secret uuid | ||
startTime Time | test start time | ||
endTime Time | test end time | ||
duration string | test duration | ||
durationMs integer | test duration in ms | ||
stepResults TestSuiteStepExecutionResultV2 array | steps execution results | ||
executeStepResults TestSuiteBatchStepExecutionResult array | batch steps execution results | ||
labels object (keys:string, values:string) | test suite labels | ||
runningContext RunningContext | |||
testSuiteExecutionName string | test suite execution name started the test suite execution | ||
disableWebhooks boolean | whether webhooks should be disabled for this execution |
Template
Template is the Schema for the Templates API
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | tests.testkube.io/v1 | ||
kind string | Template | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec TemplateSpec |
TemplateList
TemplateList contains a list of Template
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | tests.testkube.io/v1 | ||
kind string | TemplateList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items Template array |
TemplateSpec
TemplateSpec defines the desired state of Template
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type TemplateType | Enum: [job container cronjob scraper pvc webhook pod] | ||
body string | template body to use |
TemplateType
Underlying type: string
TemplateType defines template type by purpose
Validation:
- Enum: [job container cronjob scraper pvc webhook pod]
Appears in:
Field | Description |
---|---|
job | |
container | |
cronjob | |
scraper | |
pvc | |
webhook | |
pod |
Test
Test is the Schema for the tests API
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | tests.testkube.io/v1 | ||
kind string | Test | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec TestSpec |