YAKS
What is YAKS!?
YAKS is a framework to enable Cloud Native BDD testing on Kubernetes! Cloud Native here means that your tests execute as Kubernetes PODs.
As a user you can run tests by creating a Test
custom resource on your favorite Kubernetes based cloud provider.
Once the YAKS operator is installed it will listen for custom resources and automatically prepare a test runtime
that runs the test as part of the cloud infrastructure.
Tests in YAKS follow the BDD (Behavior Driven Development) concept and represent feature specifications written in Gherkin syntax.
As a framework YAKS provides a set of predefined Cucumber steps which help you to connect with different messaging transports (Http REST, JMS, Kafka, Knative eventing) and verify message data with assertions on the header and body content.
YAKS adds its functionality on top of on Citrus for connecting to different endpoints as a client and/or server.
Read more about YAKS in the reference manual
Getting started
Assuming you have a Kubernetes playground and that you are connected to a namespace on that cluster
just write a helloworld.feature
BDD file with the following content:
helloworld.feature
Feature: Hello
Scenario: Print hello message
Given print 'Hello from YAKS!'
You can then execute the following command using the YAKS CLI tool:
yaks run helloworld.feature
This runs the test immediately on the current namespace in your connected Kubernetes cluster. Nothing else is needed.
Please continue reading the documentation and learn how to install and get started working with YAKS.
For YAKS developers
Requirements:
- Go 1.13+
- Operator SDK 0.19.4+
- Maven 3.6.2+
- Git client
You can build the YAKS project and get the yaks
CLI by running:
make build
If you want to build the operator image locally for development in Minishift for instance, then:
# Build binaries and images
eval $(minishift docker-env)
make clean images-no-test
If the operator pod is running, just delete it to let it grab the new image.
oc delete pod yaks