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

Testkube Agent /test-sources 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

List test sources

List test sources available in cluster

query Parameters
selector
string

Labels to filter by

Responses

Response samples

Content type
[
  • {
    }
]

Create new test source

Create new test source based on variables passed in request

Request Body schema:
required

test source request body data

name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Response samples

Content type
application/json
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Process test source batch (create, update, delete)

Process test source batch based on variables passed in request

Request Body schema: application/json
required

test source batch request body data

required
Array of objects (TestSourceUpsertRequest)
Array
name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
application/json
{
  • "batch": [
    ]
}

Response samples

Content type
application/json
{
  • "created": [
    ],
  • "updated": [
    ],
  • "deleted": [
    ]
}

Delete test sources

Deletes labeled test sources

query Parameters
selector
string

Labels to filter by

Responses

Response samples

Content type
application/problem+json
[]

Update test source

Update test source based on test content or git based data

path Parameters
id
required
string

unique id of the object

Request Body schema:
required

test source body

name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Response samples

Content type
application/json
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Delete test source

Deletes test source by its name

path Parameters
id
required
string

unique id of the object

Responses

Response samples

Content type
application/problem+json
[]

Get test source data

Returns test sources data

path Parameters
id
required
string

unique id of the object

Responses

Response samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}