helm test: Command Reference for CI/CD
Run a release embedded tests to verify the deploy works.
helm test runs the test hooks a chart ships (pods annotated helm.sh/hook: test) against an installed release, turning "it deployed" into "it works". This reference covers the flags and a post-deploy CI smoke-test pattern.
Common flags and usage
- test <release>: run the chart test hooks against the release
- --logs: stream the test pod logs (always use in CI)
- --timeout 5m: bound how long tests may run
- --filter name=<test>: run a specific test
- Exits non-zero if any test pod fails
Example
shell
helm upgrade --install web ./charts/web \
--set image.tag=${IMAGE_TAG} --wait --atomic --timeout 5m
helm test web --logs --timeout 5mIn CI
Run helm test right after a successful upgrade --install as a smoke test against the live release. Always pass --logs so a failing test prints why in the job output instead of just exiting non-zero. A non-zero exit fails the pipeline, which is what you want.
Key takeaways
- helm test verifies the deploy works, not just that it applied.
- Always pass --logs so failures are diagnosable in CI output.
- Run it after upgrade --install --wait as a post-deploy smoke test.
Related guides
Helm Cheat Sheet: Charts, Releases & UpgradesA Helm cheat sheet - install, upgrade, rollback, template, repo, and dependency commands for managing Kuberne…
helm upgrade: Command Reference for CI/CDReference for helm upgrade: update a release or install it if absent with --install, atomic rollback, --wait…
helm lint: Command Reference for CI/CDReference for helm lint: validate a chart for structural and best-practice issues before deploy, strict mode,…
helm status: Command Reference for CI/CDReference for helm status: inspect a release state, revision, and resources, machine-readable output for CI a…