Guide

How to Test Helm Chart Examples in Documentation

Lint, render and unit-test the Helm examples in your docs, then install them in a throwaway cluster — the first layers need no cluster at all.

Published
Updated
November 21, 2026
Reading time
17 min
Facts checked against
The Helm documentation, the chart-testing and helm-unittest documentation and the kubeconform README, and the live DocsAlive product pages (November 21, 2026)
DocsAlive guide
On this pageThe short answerWhat goes stale in Helm docsExtract the examples firstFetch the dependenciesLint the chartRender the chart locallyValidate the rendered manifestsValidate the valuesUnit-test the templatesInstall and test in a throwaway clusterTest a whole repository of chartsTest the copies in your guidesKeep credentials out of the runRun it on every changeChecklist for a Helm example testWhere DocsAlive fitsWhat this does not replaceThe sources we checkedFAQ

Helm docs are full of commands and YAML: a repository to add, a chart to install, a values file to override, a few lines of output to compare against. A chart README tells the reader which values to set, and a quickstart tells them which commands to run in which order. Each of those can drift while the chart keeps working: a value is renamed, a dependency moves, a flag changes between Helm releases, a manifest uses a Kubernetes API that the cluster no longer serves, and the page a reader copies from now fails on the second command. This guide shows how to catch that before readers do: extract every documented example, lint the chart, render it locally and validate the result, unit-test the templates, and only then install it for real in a throwaway cluster.

The short answer

Test a Helm example in layers, because each layer catches a different failure, and the first layers need no cluster. Extract every command and YAML block from the docs into files a tool can read. Fetch the chart's dependencies with helm dependency build or helm dependency update. Run helm lint --strict over the chart with each documented values file. Render the chart locally with helm template, which needs no cluster, and validate the rendered manifests against Kubernetes schemas with a tool such as kubeconform. Unit-test the templates' logic with the helm-unittest plugin. Then, for the examples readers actually run, install the chart in a disposable cluster and run helm test against the release. The chart-testing tool, ct, bundles the lint and install steps for a repository of charts and runs them on the charts a pull request changed.

DocsAlive does not render charts or install them into your cluster. It reads the Markdown pages around the chart — the README, the quickstart, the tutorial, the upgrade guide — and runs the code blocks it can run in a fresh container, so the shell commands a reader copies are exercised in page order. Blocks that need a cluster or credentials are the ones a reader cannot run either without setup, and they are reported as such rather than as chart bugs. Keep the Helm tooling described here for the chart itself, and use an execution check for the prose pages readers follow. The installation docs guide covers the install steps that come before the first helm install, and the config examples guide covers YAML, JSON and TOML snippets in the same spirit.

What goes stale in Helm docs

Charts change in small steps, and each step can break a different part of the documentation:

  • Values keys. A value is renamed, nested differently or removed. The documented override still reads naturally, but it either fails against a schema or silently does nothing, which is worse.
  • Chart and dependency versions. The docs name a chart version, or a repository, that no longer matches what the chart declares. Readers install the version the page names and meet a behaviour the maintainers have since changed.
  • Repository and registry addresses. The helm repo add command in the quickstart points at an address that moved, or at a repository that has to be replaced by a different way to fetch the chart.
  • Helm flags. The command line itself changes between Helm releases. A flag that was a switch becomes an option with values, a default changes, and a documented command behaves differently on the Helm version a new reader installed today.
  • Kubernetes APIs. A rendered manifest uses an API version that newer clusters no longer serve. The chart renders cleanly on a laptop and fails on the reader's cluster.
  • Sample output. The release notes, the status block or the test output printed in the docs no longer look like what Helm prints.
  • Upgrade steps. A documented upgrade path assumes values that the new chart version has changed.

None of these need a reader to find them. Every one is visible to a linter, a renderer or a test run, which is the point of testing the examples instead of proofreading them.

Extract the examples first

Every tool below works on files, so the first job is getting each documented example into one, unchanged. Pull each command into a script that keeps the page it came from, and each values block into its own YAML file named for the page and the order in which it appears. A documented override such as a values snippet in the README is a values file in disguise: save it exactly as printed and feed it to the chart with the values option, so that the same file you test is the file the reader copies.

Do not tidy the examples as you extract them. If a documented values block has an indentation error or a key the chart does not define, that is the finding. Extraction that silently fixes the text produces a test suite that passes and docs that still fail for readers. Extract mechanically, check what you extracted, and fix the docs — not the test copies — when something fails. Extract the shell commands the same way, in page order, because a documented sequence only means something in sequence: the repository has to be added before the chart can be installed, and the release has to exist before it can be tested.

Fetch the dependencies

A chart that declares dependencies cannot be linted or rendered until the charts directory is populated. Two commands do that, and they behave differently on purpose. helm dependency update updates the on-disk dependencies to mirror the chart's metadata file: it verifies that the required charts are present and at an acceptable version, pulls the latest charts that satisfy the declared constraints, and writes a lock file. helm dependency build rebuilds the charts directory from that lock file without renegotiating versions, and mirrors the behaviour of update only when no lock file exists. For a docs test, build is usually the right choice because it reproduces the exact versions the maintainers committed; run update on a schedule, so a new dependency release shows up as a nightly failure instead of a surprise.

helm dependency build ./mychart

Lint the chart

The first check is the linter. The helm lint command takes the path to a chart and runs a series of tests to verify that the chart is well formed. If the linter finds something that would make the chart fail installation, it emits an error. If it finds something that breaks with convention or recommendation, it emits a warning. In a docs test you want both to fail the job, and the --strict flag does exactly that: it fails on lint warnings. Add --with-subcharts to lint dependent charts as well, and --quiet to print only warnings and errors:

helm lint ./mychart --strict --with-subcharts -f docs-values-readme-1.yaml

Lint with each documented values file, not only with the chart's defaults, because a documented override is part of what the docs promise. The -f option accepts a values file, --set takes values on the command line, and --set-string, --set-json and --set-file cover the other ways a reader may supply them. The linter also accepts --kube-version, a Kubernetes version used for capabilities and deprecation checks, which lets you ask whether the chart still lints cleanly against the oldest and newest cluster versions it claims to support.

The metadata file also deserves a glance. The chart's Chart.yaml requires an API version, a name and a version, and may declare a kubeVersion range of compatible Kubernetes versions. If the docs say the chart supports a range of clusters, that range is the first thing to check against the declared one.

Render the chart locally

Linting reads the chart. Rendering runs its templates. The helm template command renders chart templates locally and displays the output, and because it needs no cluster it is the workhorse of a documentation test. Two limits are worth knowing. Any value that would normally be looked up in the cluster is faked locally, and none of the server-side testing of chart validity — for example whether an API is supported — is done. Render is therefore a check that the templates produce YAML for the given values; it is not proof that a cluster accepts that YAML.

helm template my-release ./mychart -f docs-values-readme-1.yaml

Several options let you shape the render to the example under test. --kube-version sets the Kubernetes version reported to the templates as Capabilities.KubeVersion, and --api-versions (-a) sets the API versions reported as Capabilities.APIVersions, so a chart that renders different manifests depending on what the cluster supports can be rendered for each case. --show-only (-s) prints only the manifests rendered from the templates you name, which keeps a failure report short. --output-dir writes the executed templates to files in a directory instead of standard output, which is the form the next step wants. --include-crds adds the chart's custom resource definitions to the output, and --skip-tests leaves the chart's test manifests out of it.

A render failure in a documented example is a clear finding: the template references a value the documented overrides do not provide, or a function receives a type it cannot use, or a required value was added without the docs being told. Print the example's page and values file next to the error.

Validate the rendered manifests

Once the chart renders, check what it rendered. kubeconform is a Kubernetes manifest validator that checks files against schemas for a Kubernetes version you choose. Point it at the rendered output and ask for the Kubernetes version the docs claim to support. The -kubernetes-version option sets that version, -strict rejects properties that are not in the schema and duplicated keys, -summary prints a summary at the end, and -ignore-missing-schemas skips resources for which it has no schema instead of failing — useful for charts that ship custom resources, as long as you know what is being skipped:

helm template my-release ./mychart -f docs-values-readme-1.yaml --output-dir rendered
kubeconform -strict -summary -kubernetes-version 1.30.0 rendered

The Kubernetes version in that command is an example; use the oldest and newest versions your docs say the chart supports, and run the check once for each. This is the layer that catches a manifest using an API version a newer cluster no longer serves, before a reader's cluster rejects it. For machine-readable results kubeconform's -output option accepts json, junit, pretty, tap and text.

Validate the values

If a chart ships a values.schema.json file, Helm treats it as a JSON Schema imposing a structure on the chart's values file, and the lint, render and install commands check values against it unless you pass --skip-schema-validation. A schema is the strongest defence a chart has against a documented override with a wrong type or a misspelled key, because the failure arrives with a message instead of a silent no-op. If your chart has one, make sure none of your test commands skip it. If it does not, adding one is one of the cheaper ways to make the docs testable: a documented values block that does not validate is then a failure in every layer, not just a puzzle for the reader.

The command that shows a reader the available values is part of the docs too. helm show values inspects a chart — a directory, file or URL — and displays the contents of its values.yaml. If a quickstart tells readers to run it and edit the output, check that the output still contains the keys the page then tells them to change.

Unit-test the templates

Rendering shows what a template produces for one set of values. A unit test pins the behaviour: this value produces that field, this flag adds that resource. helm-unittest is a plugin that lets you write the tests in YAML, in files under the chart's tests directory with the suffix _test.yaml. Install it as a Helm plugin. The README gives different install lines for Helm 3 and Helm 4, so use the one that matches the Helm version in your test image, and add tests to the chart's .helmignore so the test files are not packaged:

helm plugin install https://github.com/helm-unittest/helm-unittest.git
helm unittest ./mychart

A suite names the templates under test and lists test cases, each with the values to set and the assertions to make. This is the example from the plugin's own README:

suite: test deployment
templates:
  - deployment.yaml
tests:
  - it: should work
    set:
      image.tag: latest
    asserts:
      - isKind:
          of: Deployment
      - matchRegex:
          path: metadata.name
          pattern: -my-chart$
      - equal:
          path: spec.template.spec.containers[0].image
          value: nginx:latest

For documentation, write one case for each override the docs promise. If the README says that setting a value turns on a feature, a test sets that value and asserts the resource appears; if it says another value changes the image, a test asserts the image. When the chart changes and the README does not, one of those cases fails, and the failing case names the promise that broke. Unit tests need no cluster and run in seconds, so they belong in the pull request lane.

Install and test in a throwaway cluster

Some documented examples only mean something against a running cluster: the quickstart whose last step opens the service, the upgrade guide that moves a release from one chart version to the next. Run those in a disposable cluster, created for the job and destroyed afterwards. Before the real install, a dry run is a cheap middle step. The current Helm reference describes --dry-run on helm install as taking one of three values: none, which is the default and executes the operation normally; client, which simulates it client-side and avoids cluster connections; and server, which simulates it on the server and requires cluster connectivity. Combined with --debug it prints all generated manifests — including Secrets, which can contain sensitive values, so the --hide-secret flag exists to hide them. Check the flag's current form with helm install --help for the Helm version you run, because the way it takes its argument has differed between releases.

For the real run, install the chart exactly as the page says, with the page's own values, then run the chart's tests. A test in a Helm chart lives under the templates directory and is a workload definition, commonly a Pod or a Job, that specifies a container with a command to run. The container must exit successfully for the test to pass, and the definition must carry the hook annotation helm.sh/hook: test. The helm create command scaffolds an example, a pod that fetches the service with wget, in templates/tests/test-connection.yaml. You run the tests of a deployed release with helm test, giving it the name of the release:

helm install demo ./mychart --namespace default -f docs-values-quickstart.yaml
helm test demo --logs

Three details matter in a docs run. The documentation warns that if you test immediately after installing, the test may show a transient failure because the pods are not yet active, so wait for readiness before testing instead of retrying until it passes — the install command's wait option and the --timeout option, which sets how long Helm waits for any individual Kubernetes operation and defaults to five minutes, are the usual tools. --logs dumps the logs from the test pods after all tests complete, which is what turns a red result into something a maintainer can act on. And --filter selects tests by name, or excludes one with a leading exclamation mark, so a documented example can run only the test that corresponds to it.

A test that passes proves the chart installs and works with the values the page used. It does not prove the page's prose is right. To close that gap, make the test assert the thing the docs claim: if the quickstart says the service answers on a port, the test pod requests that port.

Test a whole repository of charts

When a repository holds many charts, run the checks with chart-testing. The ct tool is built for linting and testing pull requests: it detects the charts that changed against the target branch, and its flags let you choose all charts (--all), specific charts (--charts), and the directories to search (--chart-dirs). The ct lint command runs helm lint, a version-increment check, YAML schema validation of Chart.yaml, YAML linting of Chart.yaml and values.yaml, and maintainer validation. The ct install command runs helm install and helm test, and optionally helm upgrade with the upgrade flag, which checks that helm test passes for the upgrade path from the previous chart revision to the current one.

ct lint --chart-dirs charts --charts charts/mychart
ct install --chart-dirs charts --charts charts/mychart

The feature that matters most for documentation is custom values. A chart can have values files matching the pattern *-values.yaml in a directory named ci at the root of the chart, and both commands run once for each of them, falling back to the chart's defaults when none exist. Put the values from the docs' examples there: the quickstart's values as ci/quickstart-values.yaml, the high-availability example as ci/ha-values.yaml. The documented examples are then part of the chart's own CI, and a pull request that breaks one cannot merge. Settings can live in a ct.yaml file, which ct loads from the current directory, $HOME/.ct or /etc/ct when no config file is given. The --additional-commands option on ct lint runs extra commands per chart, such as a unit-test run, in the order you list them.

Test the copies in your guides

The chart README is not the only place a command or a values block lives. The quickstart shows the first install a new user runs. The tutorial builds a values file up over several pages. The upgrade guide shows the before and after of a renamed value. An article on the product's own site repeats the README, and a getting-started page in another repository repeats it again. Each copy was correct when it was pasted, and each one ages independently, so a chart change that the canonical example survives can still break the tutorial.

Extract and check the copies the same way as the canonical examples — the extraction step does not care which page a block came from. When a copy fails, fix the page, then search for the same block elsewhere. The documentation drift guide covers the general pattern: examples rarely live in one place, and testing only the canonical copy leaves the others to fail in front of readers. For the shell commands in a tutorial, the quickstart and tutorial testing guide describes running them in a clean environment, in page order.

Keep credentials out of the run

Helm docs routinely show passwords, tokens and image pull secrets in values files, and a test lane should be built so that none of them can be real. Three rules keep it safe. First, the lint, render, schema-validation and unit-test lanes need no cluster and no credentials, so run them in the plainest CI job you have, with no secrets in the environment. Second, the install lane uses a disposable cluster with credentials scoped to it, held in the CI secret store; never a kubeconfig copied from someone's laptop, and never one taken from the docs. Rendered output deserves a particular warning: a dry run prints generated manifests, including Secrets, so keep that output out of public logs or hide the Secrets. Third, scan the examples before you run them: if a documented values block ships with a real password, a token or a production hostname in it, that is a finding about the docs, and it should fail the run like any other error. The credentials in docs examples guide covers how to handle examples that genuinely need a key.

Run it on every change

  • Pull requests: lint with --strict, render, validate the manifests and run the unit tests on every change to the docs or the chart. These checks need no cluster, so there is no reason for them to be rarer than the lint you already run. The pre-commit guide shows how to run the same checks before a commit leaves a laptop.
  • Releases: run the full set — including ct install with the upgrade check in a throwaway cluster, and a render against both the oldest and newest Kubernetes versions the docs name — before the new chart version is announced, so the docs and the chart change in the same step.
  • Nightly: rebuild or update the dependencies and rerun lint, render and validation even when nobody touched the docs. Dependencies and Kubernetes versions change under docs that nobody edited, and the nightly run is what catches drift from the outside. The GitHub Actions guide covers wiring these jobs into a workflow.

Whichever cadence you choose, the failure has to reach a person. A failing docs test that only colours a dashboard red will be failing, unread, on the day a reader finds the same break by hand.

Checklist for a Helm example test

  • Every command and values block extracted from the docs, unchanged, with its source page recorded.
  • Dependencies fetched with helm dependency build and refreshed on a schedule with helm dependency update.
  • helm lint --strict run once per documented values file, with subcharts included.
  • helm template run for every documented example, for the oldest and newest supported Kubernetes versions.
  • Rendered manifests validated against Kubernetes schemas, with any skipped resource kinds named.
  • A values.schema.json in the chart, with no test command skipping it.
  • helm-unittest cases for every override the docs promise.
  • Documented install commands run in a disposable cluster, followed by helm test with logs.
  • Documented values committed as ci/*-values.yaml so chart-testing runs them on pull requests.
  • Copies in quickstarts, tutorials, upgrade guides and other repositories extracted and checked too.
  • No real credentials in any example, and no cluster access in the lint and render lanes.

Where DocsAlive fits

The checks above cover the chart and its values. They do not cover the pages around it — the quickstart whose first command every new user runs, the tutorial that spans four pages, the README in each repository that repeats the install block. Those pages are Markdown, and their code blocks are where readers actually copy from. DocsAlive runs the code samples in your docs in a clean sandbox and reports what breaks: it installs DocsAlive as a GitHub App, runs the blocks, and opens fix PRs that a human approves. A free health check runs the samples on up to 40 pages of a public repo and sends a report within 2 business days — the quickest way to see where the copies in your guides stand. The docs testing checklist puts this execution layer next to the rest of the pre-release checks. If your infrastructure docs also cover Terraform, the Terraform docs testing guide applies the same layered approach.

What this does not replace

Documentation tests do not test the chart's design. A chart can lint clean, render, validate and pass its unit tests and still deploy an application that is misconfigured for production, because correctness of the design is not something these tools can see. Rendering is not installing: helm template fakes any value that would be looked up in the cluster and skips server-side validity checks, so it cannot tell you the cluster will accept the result. A passing helm test proves what the test asserts and nothing more. Security review, policy checks and load testing sit outside all of this. And none of it checks the prose — a guide can have perfectly valid examples and still explain them badly. What these checks remove is the specific, common failure where the docs show a command or a values block that the chart no longer accepts, and they remove it before a reader finds it.

The sources we checked

Source What it covers
Helm documentation: helm lint, helm template, helm install and helm test The --strict, --with-subcharts, --kube-version, --skip-schema-validation, --api-versions, --show-only, --output-dir, --include-crds, --skip-tests, --dry-run, --hide-secret, --timeout, --logs and --filter options, the limits of local rendering, and what the commands print on lint errors and warnings
Helm documentation: chart tests, the chart file structure, helm dependency, helm repo add and helm show values The test hook annotation and the exit-code rule for chart tests, the required Chart.yaml fields, the optional values.schema.json, the difference between dependency update and build, and the commands readers run first
chart-testing (ct) documentation ct lint and ct install, what each runs, changed-chart detection, the ci directory and *-values.yaml pattern, ct.yaml, and the upgrade check
helm-unittest README Installing the plugin, the suite file format and location, and the assertions used in the example
kubeconform README The -kubernetes-version, -strict, -summary, -ignore-missing-schemas and -output options
DocsAlive product pages What the health check runs, the GitHub App, and human-approved fix PRs

FAQ

Is helm lint enough?

No. Lint checks the chart's structure and conventions. It does not tell you whether the templates render correctly for the values the docs document, whether the rendered manifests are valid for a given Kubernetes version, whether the chart behaves as the README says once installed, or whether the commands on the page still work. Rendering, schema validation, unit tests and an install with the chart's own tests answer those separate questions.

Does helm template check that my cluster will accept the chart?

No. The command renders templates locally and fakes values that would normally be looked up in the cluster; it does not perform server-side checks such as whether an API is supported. Validate the rendered manifests against schemas for the Kubernetes versions you support, and use a server-side dry run or a real install in a throwaway cluster for what only a cluster can tell you.

My chart README is generated. Do I still need this?

A generated README inherits the values the generator reads, but the quickstarts, tutorials and upgrade guides around it are written by hand and do not update themselves, and a generated table of values can still be stale if the generator is not rerun. Test the handwritten examples at minimum, and run the documented values through lint and render so a stale table shows up as a failure instead of a support ticket.

Keep reading
DocsAlive guideGuide

Docs Testing: How to Test the Code Samples in Your Docs

Why code examples in documentation break, the ways teams test them (doctest, docs-as-tests, CI runners) and how to run every sample on each release.

Two lenses held over the same documentation page, each bringing a different layer into focusComparison

Vale vs markdownlint: What Each Docs Linter Catches

Vale checks prose style; markdownlint checks Markdown structure. What each catches, sample configs, running both in CI and what neither one tests.

Blueprint of two documentation pages: one with a handwritten test script, one whose code blocks are framed and checkedComparison

Doc Detective vs DocsAlive: Testing the Code in Your Docs

Doc Detective is a free, open-source docs-as-tests framework; DocsAlive is a hosted docs CI for code examples. Features, price, setup and when to use each.

A machine blueprint above a ruled documentation page, with a caliper measuring between themComparison

Promptless Alternative: Promptless vs DocsAlive Compared

Promptless drafts docs updates from what you ship; DocsAlive runs the code examples you've published. Features, pricing, security and when to use each.

A long workbench of outlined testing instruments, each with a small lime light, beside a stack of documentation pagesGuide

Best Free Tools to Test Code Examples in Documentation

Free, open-source tools that run the code examples in your docs: rustdoc, Go examples, doctest, pytest plugins, Sphinx doctest, Doc Detective and byexample.

DocsAlive guideGuide

Testing SDK Docs Before Every Release: A Release-Gate Guide

Test SDK and client-library docs against the package you ship: build the wheel or npm tarball, install it clean, run every example, and gate the release in CI.

DocsAlive guideGuide

How to Test Quickstarts and Tutorials in Your Docs

Test the onboarding path a new reader follows: run quickstarts in a clean environment, in page order, sort real bugs from credentials and fragments, and wire it into CI.

DocsAlive guideGuide

How to Test CLI Documentation: Commands, Flags and Output

Test the commands a CLI page promises: install in a clean container, run examples in order, compare flags with --help, check exit codes and output, and run it in CI.

DocsAlive guideGuide

How to Test API Reference Docs: Requests, Responses and SDKs

Test API reference pages against the contract they publish: methods, parameters, request and response examples, SDK snippets, status codes and OpenAPI samples.

DocsAlive guideGuide

Docs testing for API-first companies

Keep API quickstarts, SDK snippets and curl examples working across releases.

DocsAlive guideGuide

Docs testing for CLI and developer-tool vendors

Test developer-tool install paths, package managers and command examples across releases.

DocsAlive guideGuide

Testing README Code Examples: Install, Usage and CI

Keep README install commands and usage examples working with clean environments, output checks and CI.

DocsAlive guideGuide

Testing Notebooks and Executable Docs: Cells, Kernels and Output

Test notebooks in fresh kernels, check meaningful output and manage dependencies, data and drift in CI.

DocsAlive guideGuide

Testing Docs in GitHub Actions: Pull Requests and Scheduled Checks

Run documentation example checks in GitHub Actions with practical guidance on schedules, path filters, caching, secrets and reports.

DocsAlive guideGuide

Testing Code Examples in MkDocs, Docusaurus and Sphinx Sites

Find and test documentation examples in Markdown, MDX and reStructuredText, alongside site builds and link checks.

DocsAlive guideGuide

Python Docs Testing: Doctest, Pytest and Markdown

Test Python documentation with doctest, pytest, Markdown example execution and isolated environments.

DocsAlive guideGuide

JavaScript Docs Testing: Node, TypeScript and Modules

Test Node and TypeScript documentation examples across module formats, package versions and type checks.

DocsAlive guideGuide

Testing Go documentation examples

Test Go example functions and Markdown snippets against the intended module versions in clean environments.

DocsAlive guideGuide

Sphinx Docs Testing: doctest, code-block and MyST

Test Sphinx documentation examples: what the doctest and linkcheck builders prove, code-block and literalinclude, MyST fences, and what a Markdown scan covers.

DocsAlive guideGuide

ReadMe Docs Testing: CLI, OpenAPI and Code Examples

Test ReadMe documentation examples: docs-as-code and bi-directional sync, what lint and oas:validate prove, Tabs variants and runnable code.

DocsAlive guideGuide

TypeScript Docs Testing: tsc --noEmit and Runtime

Test TypeScript documentation examples: type-check snippets with tsc --noEmit in a consumer project, then run them, and what each check proves.

DocsAlive guideGuide

Docusaurus Docs Testing: Code Blocks, Tabs and MDX

Test Docusaurus documentation examples: builds vs runnable code, code block metadata, Tabs install variants, MDX pages and clean-container runs.

DocsAlive guideGuide

Mintlify Docs Testing: CodeGroup, Tabs and the CLI

Test Mintlify documentation examples: docs.json, MDX pages, CodeGroup and Tabs variants, what mint broken-links and mint validate prove, and clean runs.

DocsAlive guideGuide

MkDocs Docs Testing: Code Examples, Tabs and Snippets

Test MkDocs documentation examples: strict builds, Material tabs, Snippets includes, mkdocstrings pages and clean-container runs.

DocsAlive guideGuide

Testing Installation Instructions: pip, npm and Containers

Test documented install steps in clean environments: pip and extras, venv, npm install vs npm ci, containers and the first import.

DocsAlive guideGuide

AI SDK Docs Testing: LLM Examples, Keys and Drift

Test AI and LLM SDK documentation examples: requests, responses, streaming, tool calls, credentials, model retirements and CI.

DocsAlive guideGuide

Testing migration guides and changelog examples

Test before and after examples against the right releases and make migration documentation part of the release gate.

DocsAlive guideGuide

The Cost of Broken Code Examples in Documentation

Understand how broken documentation examples create friction in developer adoption and support, and how to reduce it.

DocsAlive guideGuide

Testing Rust documentation examples

Test Rust rustdoc examples and cargo documentation tests, and keep native Rust checks because compiled Rust fences are recognized but not executed.

DocsAlive guideGuide

Testing VitePress documentation examples

Test VitePress Markdown examples separately from the site build, including code groups, includes and what a plain Markdown scan covers.

DocsAlive guideGuide

Testing docs in GitLab CI

Run documentation example checks in GitLab CI jobs, keep site builds separate from execution, and review what a scan covers and skips.

DocsAlive guideGuide

Testing JSON, TOML and YAML examples in docs

Test JSON, TOML and YAML config examples in documentation: parse, schema and tool checks, honest fence labels, fragments, CI jobs and what a scan covers.

DocsAlive guideGuide

Testing Java documentation examples

Test Java examples in READMEs, SDK docs and Javadoc: the source launcher, javac, JShell scripts, assertions, @snippet files, CI and what a scan covers.

DocsAlive guideGuide

Testing PHP documentation examples

Test PHP examples in docs: php -l lint, clean-directory runs, assertions with zend.assertions, Composer scratch projects, PHPUnit, CI and scan coverage.

DocsAlive guideGuide

Testing C# documentation examples

Test C# examples in docs: .NET 10 file-based apps, dotnet build with warnings as errors, test projects, XML doc comments, CI and scan coverage.

DocsAlive guideGuide

Testing Ruby documentation examples

Test Ruby examples in docs: ruby -c syntax checks, clean-directory runs, bundler/inline, minitest assertions, YARD examples, CI and scan coverage.

DocsAlive guideGuide

Testing Kotlin documentation examples

Test Kotlin examples in docs: kotlinc runnable JARs and scripts, -Werror, KDoc @sample in compiled source, kotlinx-knit, fence labels, CI and scan coverage.

DocsAlive guideGuide

Testing Swift documentation examples

Test Swift examples in docs: swift scripts, swiftc -typecheck, DocC snippets compiled by swift build, Swift Testing assertions, CI containers and scan coverage.

DocsAlive guideGuide

Testing curl and HTTP examples in API docs

Test curl examples in API docs: --fail-with-body, status and JSON checks against a local stub, http fences, credentials and what a docs scan checks.

DocsAlive guideGuide

Testing Astro Starlight documentation examples

Test code examples in Astro Starlight docs: src/content/docs inventory, Tabs and Expressive Code, Markdoc pages, a Node check script, CI and scan coverage.

DocsAlive guideGuide

Testing Nextra documentation examples

Test code examples in Nextra docs: content/ and app/ sources, fence metadata, Tabs and npm2yarn, a Node check script, CI and an honest scan limitation.

DocsAlive guideGuide

Docs testing for open-source projects

Test the code examples in open-source docs and READMEs: pull requests from forks, release and scheduled checks, contributor guidelines, triage and the Open source plan.

DocsAlive guideGuide

Docs testing for technical writers and docs teams

How technical writers and docs teams test the code examples they publish: docs-as-code checks, style-guide rules, reading a report, routing findings to engineers.

DocsAlive guideGuide

Docs testing for DevRel teams

How developer advocates test quickstarts, tutorials, workshops and sample READMEs: an inventory, a launch and release cadence, reading a report, and honest reporting.

DocsAlive guideGuide

Testing Hugo documentation examples

Test the code examples in Hugo docs: fences with brace options, the highlight shortcode, Docsy tabs, drafts and theme example sites, scan scope and CI.

DocsAlive guideGuide

Testing GitBook documentation examples

Test the code examples in GitBook docs synced to Git: the space root, code tags, tabs, reusable includes, invisible characters, scan scope and CI.

DocsAlive guideGuide

Testing SQL examples in documentation

Test SQL examples in docs: run fences in page order on a fresh database, assert results, handle dialects, SQLite STRICT typing, psql ON_ERROR_STOP and CI.

DocsAlive guideGuide

Testing mdBook documentation examples

Test the code in an mdBook: what mdbook test covers, rust attributes, hidden lines, include directives, untagged output fences and a scan-ready copy for CI.

DocsAlive guideGuide

Testing Docsify documentation examples

Test the code examples in Docsify docs: embedded code files and fragments, docsify-tabs tab sets, Prism grammars, scan scope and a CI check.

DocsAlive guideGuide

Testing Jekyll documentation examples

Test the code examples in Jekyll docs: include tags, site variables, highlight tags, posts and _site copies, a scan-ready copy and Ruby hooks.

DocsAlive guideGuide

Testing Antora and AsciiDoc documentation examples

Test the code examples in Antora docs: example includes, tagged regions, attributes, failing the build on missing includes and a Markdown copy to scan.

DocsAlive guideGuide

Testing Fumadocs documentation examples

Test the code examples in Fumadocs docs: npm fences and package-manager tabs, tab groups, the Tabs component, includes, pycon highlighting and a scan-ready copy.

DocsAlive guideGuide

Testing versioned Docusaurus docs

Test every Docusaurus version readers can reach: versioned_docs copies, versions.json, partials, tabs, per-version scans and old-version triage.

DocsAlive guideGuide

Testing Read the Docs documentation examples

Test the code examples on a Read the Docs site: .readthedocs.yaml build jobs, a pycon gate, latest and stable versions, Sphinx, MyST and .rst coverage.

DocsAlive guideGuide

Testing Eleventy documentation examples

Test the code examples in Eleventy docs: Liquid pre-processing, global data, include tags, ignored drafts, raw tags and a rendered copy to scan.

DocsAlive guideGuide

Testing Zola documentation examples

Test the code examples in Zola docs: Tera content templating, raw tags, config values, hide_lines, drafts, blog posts and a scan-ready copy.

DocsAlive guideGuide

Testing Quarto documentation examples

Test the code examples in Quarto docs: executable cells, display-only fences, freeze and _freeze, a CI profile, cell options and a copy to scan.

DocsAlive guideGuide

Testing Hexo documentation examples

Test the code examples in Hexo docs: posts, drafts, scaffolds, codeblock and include_code tags, a build check and a scan-ready copy.

DocsAlive guideGuide

Testing pdoc documentation examples

Test the code examples in pdoc docs: doctest for >>> sessions, fenced docstring examples, the README, private items and a copy to scan.

DocsAlive guideGuide

Testing Doxygen documentation examples

Test the code examples in Doxygen docs: compiled example files, snippets, Markdown pages, WARN_AS_ERROR and what a scan can and cannot check.

DocsAlive guideGuide

Testing TypeDoc documentation examples

Test the code examples in TypeDoc docs: example tags, includeCode regions, project documents, a compiler check of extracted examples and a scan.

DocsAlive guideGuide

Testing JSDoc documentation examples

Test the code examples in JSDoc docs: example tags, captions, source patterns, tutorials, a doclet export and a scan-ready copy with assertions.

DocsAlive guideGuide

Testing docs examples with pre-commit hooks

Check docs code examples with pre-commit: local hooks, files filters, always_run, pass_filenames, SKIP and --no-verify, and what to leave for CI.

DocsAlive guideGuide

Testing documentation examples with Deno

Run docs code examples with deno test --doc: JSDoc and Markdown examples, imports, hashbang permissions, ignored blocks and deno check --doc-only.

DocsAlive guideGuide

Testing documentation examples with Sybil

Test Python docs examples with Sybil and pytest: Markdown parsers, invisible setup, skips, clear-namespace, docstrings and pycon fences a scan can read.

DocsAlive guideGuide

Testing Markdoc documentation examples

Test the code examples in Markdoc docs: variables in fences, partials, if/else, custom tabs, validate in CI and a scan-ready copy from transform.

DocsAlive guideGuide

Testing Markdown examples with phmdoctest

Test Python examples in README and Markdown files with phmdoctest: sessions, output blocks, directives, --report, generated pytest files and pycon fences.

DocsAlive guideGuide

Testing Markdown code blocks with pytest-markdown-docs

Run Markdown python fences as pytest tests with pytest-markdown-docs: globals hook, fixtures, continuation, notest, retry and pinning the released version.

DocsAlive guideGuide

Testing command line docs with prysk and Cram

Test CLI docs with prysk and Cram: .t transcripts, exit statuses, (re) and (glob) matches, and generating tests from the console blocks in your Markdown.

DocsAlive guideGuide

Testing Python docstring examples with xdoctest

Run docstring examples with xdoctest: the pytest plugin, google and freeform parsing, permissive output matching, directives, and what it does not check.

DocsAlive guideGuide

Testing multi-language docs examples with byexample

Test docs examples with byexample: prompt-based language detection, the -l selection, +pass, +skip and timeouts, capture tags, and hidden setup in comments.

DocsAlive guideGuide

Testing Markdown code blocks with mktestdocs

Run Markdown code blocks under pytest with mktestdocs: exact fence labels, memory=True for shared state, bash blocks, custom executors and docstring checks.

DocsAlive guideGuide

Testing README code blocks with pytest-codeblocks

Run README and Markdown code blocks with pytest-codeblocks: exact python, sh and bash labels, cont, skip and xfail markers, expected output, and gaps.

DocsAlive guideGuide

Testing Markdown code examples in any language with txm

Test annotated Markdown examples with txm: program, in, out, err, check and exit annotations, TAP output, exact matching, and blocks it never runs.

DocsAlive guideGuide

Testing Sphinx docs examples with sphinx.ext.doctest

Run Sphinx doctest, testcode and testoutput directives in reStructuredText or MyST pages: groups, hidden setup, global setup and what is never run.

DocsAlive guideGuide

Testing docs examples that need API keys

Test credential-gated docs examples: honest placeholders, offline stubs and fixtures, live sandbox jobs, CI secrets and fork rules, and how a scan classifies them.

A machine blueprint above a ruled documentation page, with a caliper measuring between themGuide

Documentation Drift: How to Detect It Before Users Do

What documentation drift is, why code examples drift first, and practical ways to detect it: ownership, release checks, link and execution tests.

See which of your code samples still run.

Send us a public repository. Our team runs DocsAlive on its docs and emails you the real report within 2 business days. Free, no signup.