Testkube Execution CRDs
Testkube allows you to automatically trigger the execution of Test, Suites and Test Workflows by creating or updating corresponding Test, Test Suite or Test Workflow Execution CRDs.
Please note that Tests and Test Suites are being deprecated - Read more
What are Testkube Execution CRDs?
In generic terms, an Execution defines a test, testsuite or testworkflow which will be executed when CRD is created or updated. For example, we could define a TestExecution which runs a Test when a TestExecution gets modified.
Selecting Resource
Names are used when we want to select a specific resource.
test:
name: Testkube test name
or
testSuite:
name: Testkube test suite name
or
testWorkflow:
name: Testkube test workflow name
Execution Request
An Execution Request defines execution parameters for each specific resource.
Example
Here are examples for a Test Execution testexecution-example which runs the Test test-example when the Test Execution is created or updated, a Test Suite Execution testsuiteexecution-example which runs the Test Suite testsuite-example when the Test Suite Execution is created or updated and a Test Workflow Execution testworkflowexecution-example which runs the Test Workflow testworkflow-example when the Test Workflow Execution is created or updated
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflowExecution
metadata:
name: testworkflowexecution-example
spec:
testWorkflow:
name: testworkflow-example
executionRequest:
config:
browser: "chrome"
Check out the TestWorkflowExecution CRD Reference
apiVersion: tests.testkube.io/v1
kind: TestExecution
metadata:
name: testexecution-example
spec:
test:
name: test-example
executionRequest:
variables:
VAR_TEST:
name: VAR_TEST
value: "ANY"
type: basic
apiVersion: tests.testkube.io/v1
kind: TestSuiteExecution
metadata:
name: testsuiteexecution-example
spec:
testSuite:
name: testsuite-example
executionRequest:
variables:
VAR_TEST:
name: VAR_TEST
value: "ANY"
type: basic
Architecture
Testkube uses a Kubernetes Operator to reconcile Test, Test Suite and Test Workflow Execution CRDs state and run the corresponding test, test suite and test workflow when resource generation is changed.