DEV.co
Open-Source Testing · helm-unittest

helm-unittest

helm-unittest is a BDD-style unit testing framework for Kubernetes Helm charts, packaged as a Helm plugin. It lets you write tests in YAML to validate chart behavior without deploying to a cluster, supporting snapshot testing, template rendering validation, and CI/CD integration.

Source: GitHub — github.com/helm-unittest/helm-unittest
1.4k
GitHub stars
317
Forks
Go
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryhelm-unittest/helm-unittest
Ownerhelm-unittest
Primary languageGo
LicenseMIT — OSI-approved
Stars1.4k
Forks317
Open issues80
Latest releasev1.1.1 (2026-06-05)
Last updated2026-06-24
Sourcehttps://github.com/helm-unittest/helm-unittest

What helm-unittest is

Go-based plugin that performs local template rendering and assertion testing against Helm charts using pure YAML test suites. Supports wildcard template selection, value injection, snapshot testing, subchart testing, and multiple output formats (JUnit, NUnit, XUnit) for CI pipelines.

Quickstart

Get the helm-unittest source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/helm-unittest/helm-unittest.gitcd helm-unittest# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Pre-deployment chart validation in CI/CD

Integrate into pipelines to catch template rendering errors, configuration mistakes, and breaking changes before chart release or deployment.

Chart regression testing across Helm versions

Maintain test suites that verify chart behavior remains consistent as Helm versions change or chart dependencies are updated.

Multi-environment chart parameterization testing

Use templated test suites to validate chart output across dev, staging, and production configurations without manual duplication.

Implementation considerations

  • Test files must follow naming convention (`*_test.yaml`) and be placed in `tests/` directory by default; glob patterns can customize this with `-f` flag.
  • Add `tests` to `.helmignore` to prevent test files from being packaged into released charts.
  • Snapshot testing requires careful `.helmignore` setup to avoid rendering snapshots on subsequent runs; document snapshot update process for team.
  • Templated test suites (using `--chart-tests-path`) require a separate Helm chart structure; do not co-locate with standard test files.
  • Output format selection (JUnit, NUnit, XUnit) depends on CI/CD platform integration; verify compatibility with your pipeline tools.

When to avoid it — and what to weigh

  • You need runtime cluster behavior testing — helm-unittest validates template output and static assertions only; it cannot test actual pod scheduling, network policies, or runtime behavior.
  • Your charts rely on dynamic external data — Tests are best suited to static or value-injected configurations; external API calls or live service discovery during rendering are not supported.
  • You require security scanning or compliance validation — While useful for structure validation, this tool is not a policy engine or compliance scanner; pair with separate tools (e.g., Kyverno, OPA) for security gates.
  • Your team is unfamiliar with YAML or Helm internals — Effective test writing requires understanding Helm template syntax, YAML structure, and JSONPath; steep learning curve for non-infrastructure teams.

License & commercial use

MIT License. Permissive OSI-compliant license allowing commercial use, modification, and distribution with attribution. No restrictions on proprietary use.

MIT License explicitly permits commercial use without licensing fees or restrictions. Safe for proprietary chart testing in production environments. No warranty provided; review liability terms as part of your risk assessment.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No security analysis performed. Consider: (1) Plugin installation over HTTPS; GPG verification available for signed releases. (2) Test files containing sensitive values should be stored securely (not in VCS unencrypted). (3) Local rendering reduces attack surface vs. cluster-based testing, but rendered YAML may expose secrets if not filtered. (4) Dependency on Go stdlib and Helm binary; monitor upstream for vulnerabilities. (5) OpenSSF Best Practices badge suggests some security practices are in place; review project scorecard for details.

Alternatives to consider

Kube-score

Static analysis and scoring of Kubernetes manifests; focuses on best practices and security compliance rather than BDD-style unit testing.

Kubeval

Validates YAML against OpenAPI schemas; lighter-weight schema validation without test suites or assertions, better for CI gates.

Conftest (OPA/Rego)

Policy-as-code framework for Kubernetes YAML; more powerful for compliance and security rules, but steeper learning curve than YAML tests.

Software development agency

Build on helm-unittest with DEV.co software developers

Validate chart behavior before production. Install helm-unittest as a Helm plugin and write your first test in minutes.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

helm-unittest FAQ

Can helm-unittest deploy to or validate against a live cluster?
No. It renders templates locally without connecting to any cluster. Use integration tests (e.g., Helm test hooks, Kubernetes e2e tests) to validate runtime behavior.
How do I test charts with external dependencies or data sources?
Use value injection (`set` in test suite) to mock external inputs. For dynamic data, consider mocking or parameterizing tests; live dependencies during rendering are not supported.
What is snapshot testing and when should I use it?
Snapshot testing captures rendered YAML output and compares future renders against it, catching unintended changes. Use for complex charts or when template output stability is critical; requires discipline to review snapshot updates in code review.
Does this tool enforce security or compliance policies?
No. It is a structural and rendering test tool. Pair with Kyverno, OPA, or similar policy engines for security and compliance enforcement.

Software developers & web developers for hire

Adopting helm-unittest is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source testing software in production.

Start Testing Your Helm Charts

Validate chart behavior before production. Install helm-unittest as a Helm plugin and write your first test in minutes.