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


Our dedicated Ginkgo executor allows running Ginkgo tests with Testkube - directly from your Git repository.

  • Default command for this executor: ginkgo
  • Default arguments for this executor command: -r -p --randomize-all --randomize-suites --keep-going --trace --junit-report <reportFile> <envVars> <runPath>

Parameters in <> are calculated at test execution:

  • <reportFile> - report file set by GinkgoJunitReport, report.xml by default
  • <envVars> - list of environment variables
  • <runPath> - project path set by GinkoTestPackage, location of the test files by default

See more at "Redefining the Prebuilt Executor Command and Arguments" on the Creating Test page.

🎓What is Ginkgo?
  • Ginkgo is a popular general purpose testing framework for the Go programming language that, when paired with Gomega, provides a powerful way to write your tests.
  • Built on top of Go's testing infrastructure, it lets you write more expressive tests for different use cases: unit tests, integration tests, performance tests, and more.

Check out our blog post to learn to write more expressive tests in Go using Ginkgo, Gomega, and Testkube.

Test Environment

Let's try some simple Ginkgo. Testkube's Ginkgo Executor uses the ginkgo binary and allows configuring its behavior using arguments.

Because Ginkgo projects are quite complicated in terms of directory structure, we'll need to load them from a Git directory.

You can find example projects in the repository here.

Let's create a simple test which will check if an env variable is set to true:

package smoke_test

import (
. ""
. ""

var _ = Describe("Smoke", func() {
Describe("Ginkgo smoke test", func() {
It("Positive test - should always pass", func(){

The default Ginkgo executor:

kind: Executor
name: ginkgo-executor
namespace: testkube
- artifacts
- junit-report
image: kubeshop/testkube-ginkgo-executor:0.0.4
- ginkgo/test

Create a New Ginkgo-based Test

Write a Ginkgo Test

We'll try to check if there are any executors registered on the Testkube demo cluster. To do that we need to check the /v1/executors endpoint. Results should have at least one Executor registered.

package testkube_api_test

import (


. ""
. ""

var _ = Describe("API Test", func() {
It("There should be executors registered", func() {
resp, err := http.Get("")

executors, err := GetTestkubeExecutors(resp.Body)

Expect(len(executors)).To(BeNumerically(">", 1))

func GetTestkubeExecutors(body io.ReadCloser) ([]testkube.ExecutorDetails, error) {
bytes, err := io.ReadAll(body)
if err != nil {
return nil, err

results := []testkube.ExecutorDetails{}
err = json.Unmarshal(bytes, &results)

return results, err

The test is run in the standard Ginkgo bootstrapped project.

go mod init testkube-ginkgo-example
ginkgo bootstrap

Everything was pushed to the Git repository.

You can also look at the code in our examples.

Add Test to Testkube

To add a Ginkgo test to Testkube you need to call the create test command. We'll assume that our test is in a Git repository.

kubectl testkube create test --git-uri --git-path examples/testkube-api --type ginkgo/test --name ginkgo-example-test --git-branch main

Running a Test

Let's pass the env variable to our test run:

 tk run test ginkgo-example-test -f                     

Type: ginkgo/test
Name: ginkgo-example-test
Execution ID: 62eceb8df4732077cee099cf
Execution name: ginkgo-example-test-3
Execution number: 3
Status: running
Start time: 2022-08-05 10:06:05.467437617 +0000 UTC

... other logs

Running in parallel across 7 processes

Ran 1 of 1 Specs in 0.091 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Ginkgo ran 1 suite in 7.447676906s
Test Suite Passed

Test execution completed with success in 15.586s 🥇

Watch test execution until complete:
$ kubectl testkube watch execution 62eceb8df4732077cee099cf

Use the following command to get test execution details:
$ kubectl testkube get execution 62eceb8df4732077cee099cf

Getting Test Results

We can always get back to the test results:

kubectl testkube get execution 62eceb8df4732077cee099cf


# ....... a lot of Ginkgo logs

ID: 62eceb67f4732077cee099cd
Name ginkgo-example-test-2
Number: 2
Test name: ginkgo-example-test
Type: ginkgo/test
Status: passed
Start time: 2022-08-05 10:05:27.659 +0000 UTC
End time: 2022-08-05 10:05:43.14 +0000 UTC
Duration: 00:00:15

go: downloading v1.4.5
go: downloading v1.20.0
go: downloading v2.1.4
go: downloading v0.5.8
go: downloading v0.0.0-20220722155237-a158d28d115b
go: downloading v3.0.1
go: downloading v0.0.0-20220722155257-8c9f86f7a55f
go: downloading v0.3.7
go: downloading v1.10.1
go: downloading v0.0.0-20191129215211-8e5a1ed0cff0

Running Suite: TestkubeApi Suite - /tmp/git-sparse-checkout2422275089/repo/examples/testkube-api
Random Seed: 1659693931 - will randomize all specs

Will run 1 of 1 specs
Running in parallel across 7 processes

Ran 1 of 1 Specs in 0.088 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Ginkgo ran 1 suite in 7.7928584s
Test Suite Passed

Status Test execution completed with success 🥇


Testkube simplifies running Go tests based on Ginkgo and allows them to run in your Kubernetes cluster with ease.