Search⌘ K

Run Tests for a Chart

Explore how to run tests for Helm charts including executing helm test commands and reviewing outputs. Understand how to handle test Pod lifecycle and logs, and learn strategies for cleaning up test resources to maintain deployment quality and Kubernetes environment hygiene.

Run a Helm chart test

Assuming that we already have a couple of tests written in the /tests directory of the chart, we can now go ahead and run them. We can achieve this by running the following helm test command:

Shell
helm test kanban-frontend --namespace kanban

The output will be as follows:

NAME: kanban-frontend
LAST DEPLOYED: Tue Aug 16 13:16:08 2022
NAMESPACE: kanban
STATUS: deployed
REVISION: 1
TEST SUITE:     kanban-frontend-connection-test
Last Started:   Tue Aug 16 13:17:36 2022
Last Completed: Tue Aug 16 13:17:39 2022
Phase:          Succeeded
NOTES:
### 
######

kanban-frontend, version: 1 has been installed, based on "app" Helm Chart!

Here is a short summary of installed application:

Docker base image: wkrzywiec/kanban-app:helm-course
Instances count: 1


######

Useful commands:

To list all Kubernetes resources created in this kanban-frontend Release:

    > kubectl get all --namespace kanban -l app.kubernetes.io/version=kanban-frontend-1

To establish connection with your app:

    > kubectl port-forward svc/kanban-frontend 8080:8080 --namespace kanban 

After that it will be reachable at the address http://localhost:8080

######
###
...