Welcome to TestKube Template Executor
TestKube Template Executor is a test executor skeleton for TestKube.
You can use it as basic building blocks for creating a new executor.
What is an Executor?
Executor is nothing more than a program wrapped into Docker container which gets JSON (testube.Execution) OpenAPI based document as an input and returns a stream of JSON output lines (testkube.ExecutorOutput), where each output line is simply wrapped in this JSON, similar to the structured logging idea.
Issues and enchancements
Implemention in several steps:
- Create new repo on top of this template
go.modfile with your path (just replace
github.com/kubeshop/testkube-executor-templateproject-wise with your package path)
- Implement your own Runner on top of [runner interface](https://github.com/kubeshop/testkube/blob/main/pkg/runner/interface.go
- Change Dockerfile – use base image of whatever test framework/library you want to use
- Build and push dockerfile to some repository
- Register Executor Custom Resource in your cluster
apiVersion: executor.testkube.io/v1 kind: Executor metadata: name: postman-executor namespace: testkube spec: executor_type: job image: kubeshop/testkube-template-executor:0.0.1 types: - example/test
This Executor template offers you basic building blocks to write a new executor based on TestKube
libraries written in Go programming language, but you’re not limited only to Go, you can
The only thing you’ll need to do is to follow the OpenAPI spec for input
(passed as first argument in JSON form) and all output should be JSON lines
You should also have a final
ExecutionResult attached somewhere after successful (or failed) test execution.
Go based resources for input and output objects:
For more info go to main testkube repo