Creating Test Workflows
CLI
Testkube CLI allows managing Test Workflows in the similar way as Test and TestSuites.
Create
testkube create testworkflow -f EXAMPLE_FILE.yaml
kubectl apply
Alternatively, the kubectl apply
can be used:
kubectl apply -f EXAMPLE_FILE.yaml
Get
The Test Workflow details can be displayed using testkube get testworkflow
command using the Test Workflow name:
testkube get testworkflow TEST_WORKFLOW_NAME
Filtering by Labels
Test Workflows can also be filtered using labels with --label
:
testkube get testworkflow --label example=label
Run
The Test Workflow can be run using the testkube run testworkflow
command using Test Workflow name:
testkube run testworkflow TEST_WORKFLOW_NAME
Optionally, the follow option can be used to watch execution and get the log summary directly:
testkube run testworkflow TEST_WORKFLOW_NAME -f
Delete
The Test Workflow can be deleted using the testkube delete testworkflow
command using the Test Workflow name:
testkube delete testworkflow TEST_WORKFLOW_NAME
Alias
tw
alias can be used instead of testworkflow
- for example:
testkube get tw
Testkube Pro UI (Dashboard)
If you prefer to use the Dashboard, go to Test Workflows:
and click the Add a new test workflow
button.
Creation Options
Currently, the Test Workflow can be created from scratch, with the help of the wizard, by using an example or by importing YML.
Wizard
The wizard consists of three steps:
Name & Type
To define a test, specify its name and choose from the available templates. Each template may come with predefined configuration values, which can be modified as needed.
Source
Specify the source from which to fetch the data. Choose between Git, File, or String sources.
Summary
Preview the YAML content of the test workflow, make changes if necessary, and create it.
Example
You can choose one of the predefined examples and adjust it.
YML
You can also paste the complete Test Workflow definition
Additional Test Workflow Examples
Additional Test Workflow examples can be found in the Testkube repository.