Guide

How to Test Kubernetes Manifest Examples in Documentation

Validate the manifests and kubectl commands in your deployment guides, then apply them to a throwaway cluster, exactly as written.

Published
Updated
November 20, 2026
Reading time
9 min
Facts checked against
The Kubernetes Deprecated API Migration Guide, the kubeconform and Pluto documentation, and the live DocsAlive product pages (November 20, 2026)
DocsAlive guide
On this pageThe short answerWhat goes stale in a manifest exampleValidate each manifest against its target versionScan for removed APIsDry-run against the APIApply to a throwaway clusterCheck the commands and flagsKeep credentials out of the runRun it on every changeChecklist for a Kubernetes manifest testWhere DocsAlive fitsWhat this does not replaceThe sources we checkedFAQ

Kubernetes examples age fast. An apiVersion that worked two releases ago may be removed in the version your reader runs, and the manifest in the docs still parses as YAML. The API server is what rejects it, at apply time, in front of the reader. This guide covers how to test manifest examples against the versions they claim to support, before a reader has to.

The short answer

Extract each manifest from the docs exactly as published — do not clean it up first. Validate it against the schemas of the Kubernetes version the docs target, not just the newest one. Scan for deprecated and removed APIs explicitly, because a manifest can be schema-valid for one version and impossible on the next. Then apply it to a throwaway cluster and watch the rollout reach the state the docs promise. Record the tool versions and the target version with every result, because a manifest test without a version is a result nobody can reproduce.

DocsAlive does not validate manifests against a cluster. It runs the code samples in your Markdown docs — the kubectl commands and shell sequences around the YAML — in a fresh container, and reports the ones that break. The manifest checks on this page stay with your Kubernetes tooling; the config examples guide covers the wider problem of testing configuration that docs ask readers to copy.

What goes stale in a manifest example

  • Removed APIs: a beta apiVersion is removed in a later Kubernetes release, and the example fails at apply time.
  • Changed fields: a field is renamed or moved between versions of the same resource.
  • Images and tags: the example's container image tag no longer exists or now points at a different build.
  • Commands: a kubectl flag in the surrounding steps is deprecated or removed.

Removals are the sharpest failure because they are scheduled. Kubernetes announces them in its Deprecated API Migration Guide, and the removals that catch documentation most often are these:

API Removed in Use instead
Ingress extensions/v1beta1 and networking.k8s.io/v1beta1 1.22 networking.k8s.io/v1
CronJob batch/v1beta1 1.25 batch/v1
PodDisruptionBudget policy/v1beta1 1.25 policy/v1
PodSecurityPolicy policy/v1beta1 1.25 No replacement API — Pod Security Admission
HorizontalPodAutoscaler autoscaling/v2beta1 1.25 autoscaling/v2
HorizontalPodAutoscaler autoscaling/v2beta2 1.26 autoscaling/v2

A version bump is not always a rename. The Ingress migration to networking.k8s.io/v1 also changed the shape: spec.backend became spec.defaultBackend, serviceName and servicePort became service.name and service.port, and every path needs a pathType. An example updated by changing only the apiVersion line still fails. Behaviour can change under the same fields, too: an empty spec.selector on a PodDisruptionBudget selects no pods in policy/v1beta1 and all pods in the namespace in policy/v1 — a manifest that applies cleanly on both versions and means different things.

Validate each manifest against its target version

  1. Extract each manifest from the docs exactly as shown.
  2. Validate it with a schema validator against the target version, for example kubeconform -kubernetes-version 1.30 -strict -summary manifest.yaml
  3. Record any field the validator rejects, with the manifest's location in the docs.
kubeconform -kubernetes-version 1.30 -strict -summary docs/examples/*.yaml

kubeconform validates resources against the published Kubernetes JSON schemas. The flags that matter for docs work: -kubernetes-version pins the schema set to the version the docs target, so a field removed in that version fails here instead of on a reader's cluster; -strict rejects fields the schema does not define, which is how misspelled or long-removed fields surface; -summary prints counts instead of one line per valid file. Two cautions. Custom resources need their schemas supplied with -schema-location, or skipped deliberately with -skip — silently skipping a kind is how a broken CRD example passes. And -ignore-missing-schemas should be a recorded decision, never a default: it tells the validator to pass what it cannot check.

Validate against every version the docs claim to support, not only the newest. A manifest can be valid for 1.30 and invalid for 1.28 if it uses a field added in between, and the reverse — valid on the old version, removed on the new — is the failure this guide exists to catch. If the docs state a minimum version, that version is part of the test matrix.

Scan for removed APIs

Schema validation answers "is this manifest well-formed for version X." A deprecation scan answers the docs question directly: "does this example use an API that is deprecated or already removed, and what replaces it?" Pluto, from Fairwinds, scans files and Helm charts for exactly that:

pluto detect-files -d docs/examples/

Each finding names the resource, the version it uses, the replacement, and whether that version is deprecated or removed. Pluto exits with a non-zero status when it finds deprecated or removed APIs, which makes it usable as a CI gate rather than a report nobody reads. Its detect-helm mode does the same for releases already installed in a cluster, which is useful when the docs ship a chart rather than raw manifests.

Run both tools. kubeconform with -strict catches misspelled and unknown fields that a deprecation scan ignores; Pluto catches a perfectly well-formed manifest whose API is scheduled for removal, which schema validation against today's version also passes. Between them they cover the two ways an example dies: it was never right for the target version, or the target version moved.

Dry-run against the API

A schema validator works offline. The API server is the second opinion, and kubectl offers two levels of it:

kubectl apply --dry-run=client -f manifest.yaml
kubectl apply --dry-run=server -f manifest.yaml

A client dry run checks the manifest locally. A server dry run sends it to the API server, which runs the same admission and validation the real apply would — including defaulting and the checks for APIs the cluster no longer serves — without persisting anything. A manifest written for a removed API fails the server dry run against a current cluster even though it is valid YAML and was valid documentation two releases ago. Add --validate behaviour deliberately: kubectl's own client-side schema validation can be pointed at the cluster's schemas or turned off, and a test record should say which setting was used.

Mind the version pairing while you do this. kubectl is supported within one minor version of the API server, in either direction. A test run with a much newer or older kubectl can fail — or pass — for reasons that have nothing to do with the manifest, so record both versions with the result.

Apply to a throwaway cluster

  1. Create a throwaway cluster, for example with kind or minikube.
  2. Apply the manifest unchanged, for example kubectl apply -f manifest.yaml
  3. Check the resource reaches the state the docs describe, for example kubectl rollout status deployment/example
  4. Delete the cluster after the check.
kind create cluster --name docs-test
kubectl apply -f manifest.yaml
kubectl rollout status deployment/example
kind delete cluster --name docs-test

Applying is the only step that tests the whole example: the image pulls, the container starts with the documented command and environment, probes pass, and any referenced ConfigMap, Secret or Service in the same example exists. Before applying an updated example over an old one, kubectl diff -f manifest.yaml shows what would change — the fastest way to see that a "small docs fix" also renames a resource or changes a selector, which in a real cluster means a replaced workload, not an edited one.

Check the state the docs promise, not just a successful apply. kubectl apply succeeding means the API accepted the objects. If the guide says the pod becomes ready and serves traffic, watch the rollout and then ask the service the documented question. A crash-looping pod behind a successfully applied Deployment is a docs failure the apply step alone reports as green.

Check the commands and flags

Docs usually wrap a manifest in commands: apply it, check the rollout, fetch logs, port-forward to try it. Test those commands with the manifest, because a removed flag in the prose breaks the example even when the YAML is current. Check each flag against the help output of the kubectl version the docs target — kubectl apply --help is the reference, not memory — and prefer the long-lived forms in examples. Where a step needs output in a specific shape, such as a jsonpath expression copied from the resource's status, run it against the applied resource: field paths in status objects change between versions just as spec fields do.

Keep credentials out of the run

Use a local throwaway cluster for examples, not a shared staging cluster. If an example needs a Secret, create a dummy value for the test and do not copy a real credential into the manifest. Manifest examples that print a real-looking token or a base64 blob readers mistake for a real Secret teach a habit you do not want your docs teaching; base64 is an encoding, not protection, and a committed example Secret tends to be copied into real clusters unchanged.

Clean up after the run. A throwaway cluster that is never deleted stops being throwaway, and its kubeconfig tends to spread. Keep the test kubeconfig separate from any real one, and make the delete step part of the script rather than a manual habit, so a failed run still cleans up.

Run it on every change

  • Pull requests that touch docs or manifests: validate and apply the affected examples.
  • Releases: run the full set against the release's target versions.
  • Nightly: run against the newest Kubernetes version, so removals surface before readers upgrade.

A minimal CI outline:

# 1. Schema validation against the documented target version
kubeconform -kubernetes-version 1.30 -strict -summary docs/examples/*.yaml

# 2. Deprecation and removal scan (non-zero exit on findings)
pluto detect-files -d docs/examples/

# 3. Apply to a throwaway cluster and watch the rollout
kind create cluster --name docs-test
kubectl apply -f docs/examples/
kubectl rollout status deployment/example
kind delete cluster --name docs-test

When a new Kubernetes release lands, add its version to the matrix before announcing support for it, and run the removal scan with that release as the target. The Deprecated API Migration Guide publishes the schedule well ahead of each removal — the nightly run exists so your docs meet the schedule on your timing instead of a reader's.

Checklist for a Kubernetes manifest test

Check Evidence to retain
Manifest extracted unchanged Source page and block the manifest was taken from
Schema validation passes per target version Validator, version matrix and strict-mode result
No deprecated or removed APIs Pluto output, including the replacement for each finding
Server dry run passes Cluster and kubectl versions the dry run ran against
Applied to a throwaway cluster Rollout status and the documented end state observed
Surrounding commands run as written kubectl version each flag was checked against
No real credentials in examples Dummy values used; test cluster and kubeconfig deleted
Images in the example resolve Tags pulled during the apply run, recorded with the result

Where DocsAlive fits

DocsAlive runs the code samples in your docs in an isolated container on each release and nightly, separates likely docs bugs from expected failures, and can draft the fix for your team to review. On a Kubernetes guide, that covers the shell sequence the reader follows — the commands around the manifest, in order, in a clean environment — which is where stale flags, renamed files and missing setup steps surface.

For a starting point, the free health check lets you send a public repository you own or maintain; the team runs the engine on up to 40 of its docs pages and emails the real report within 2 business days; the checkout is deleted after the run. Pricing is Open source $0/month, Team $299/month, Growth $699/month, and Scale from $1,499/month.

What this does not replace

DocsAlive does not validate manifests against your cluster's schemas, scan for removed APIs, or replace kubeconform, Pluto and a throwaway-cluster apply. Keep those for the manifests themselves. A manifest that applies also does not prove the workload is well run — resource limits, security context and upgrade safety are separate reviews — and it does not prove the prose around the manifest explains it correctly.

The sources we checked

Source What it covers
Kubernetes Deprecated API Migration Guide Removed APIs, the versions they were removed in, and their replacements
kubeconform documentation Schema validation flags: version pinning, strict mode, schema locations
Pluto documentation detect-files and detect-helm modes and CI exit behaviour
kubectl reference Apply dry runs, diff, rollout status and version skew with the API server
kind documentation Creating and deleting throwaway local clusters

FAQ

The manifest is valid YAML. Why does the cluster reject it?

Because YAML validity is only syntax. The API server rejects APIs it no longer serves and fields its schemas do not define. A manifest for an API removed in 1.25 is perfect YAML and an error on a 1.25 cluster — which is why validation has to name a target version.

Is schema validation enough on its own?

No. It proves the manifest matches a version's schemas. It does not scan for deprecations on their own schedule, and it does not prove the workload runs. Pair it with a removal scan and a throwaway-cluster apply.

Which versions should the examples be tested against?

Every version the docs claim to support, including the stated minimum. Fields are added as well as removed, so the newest version passing says nothing about the oldest.

Does DocsAlive validate manifests?

No. It runs the code samples in your Markdown docs and reports the blocks that break. Manifest validation, removal scanning and cluster testing stay with kubeconform, Pluto and kubectl.

How often should manifest examples be retested?

On pull requests that touch them, in full at release, and nightly against the newest Kubernetes version — removals land on the Kubernetes schedule, not on your docs schedule.

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.