Skip to content
Latchkey

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 5m

In 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →