CloudTest- Run tests with a repeatable multi-cluster Kubernetes environment
As part of the Network Service Mesh toolchain, it is an easy and environment-independent way to create Kubernetes clusters; and run go tests on them. CloudTest allows us to deploy and test cloud-native apps in a platform-agnostic way. It integrates easily into any CI (continuous integration) system.
Using CloudTest, we can deploy or run tests on any environment like Kind, K3d, EKS, GKE, etc. It helps in end-to-end testing of Kubernetes clusters starting from creation, installation, testing, and deletion, providing information about the Kubernetes cluster and its components.
CloudTest Architecture :
Steps to run the Sample CloudTest for multiple clusters:
Prerequisite to be installed:
- Install CloudTest:
$ go get github.com/networkservicemesh/cloudtest@master and/or $ go get github.com/networkservicemesh/cloudtest
Clone this repository to try the sample CloudTest:
Run this CloudTest config: config
Command: (can be easily plugged in CI to run tests on the Kubernetes cluster )
$ cloudtest --config=.cloudtest.yaml
When the CloudTest gets executed, it creates a cluster based on the type of cluster set- Kind in this scenario. Makefile in this repository provides utility to create/delete cluster and get the kubeconfig of the cluster.
It runs the sample tests from here for multiple clusters: go-tests
CloudTest reporting and go tests execution section:
- The expected outcome of CloudTest:
The logs of the CloudTest are created in this directory:
Refer to these logs here: output-logs
It creates the test report in junit.xml, refer here: junit-xml
Call for Action:
Plug CloudTest into your CI system now! Leverage the use of
CloudTest to develop and test your cloud-native system
without worrying about the type of environment.
Reach out to me for any questions.
For more details: refer