Each entry lists what changed for you in one Doc Detective release. New features come first, then behavior and breaking changes, then notable bug fixes. Releases that only changed internals say so in one line. The newest release comes first, and the oldest entry is version 3.0.0. Major releases lead with their breaking changes and migration steps. To find your installed version, run npx doc-detective --version.
Moving to Doc Detective 5? Start with Upgrade to Doc Detective 5.
For commit-level detail, including changes to build and test tooling, see the GitHub releases for Doc Detective.
v5.9.0
New features
- Each run compares its failures with the newest earlier run in the same
outputDir. The terminal, Markdown, and HTML reports tag each failure[new]or[already failing]and list the tests that are now fixed. The results add acomparisonobject and afailureStatuson each context. Choose what to compare with incompareToor--compare-to. See Compare with an earlier run. - Set
failOn: "new"or pass--fail-on newto fail a run only when a failure is new. When every failure was already failing, the run exits0. See Fail only on new failures. - An
httpRequeststep’sresponse.schematakes a JSON Schema the response body must match. Use it to check the types, formats, and patterns of values that change every run, such as IDs and timestamps. See Check types, formats, and patterns.
v5.8.0
New features
- The
checkFileaction waits for a finished file and can check its text. Setpathto match files relative to the spec, such as a report a command writes. Setdownloadto match a file the browser downloaded. Downloads work in desktop Chrome and Firefox. - Doc Detective runs Gherkin
.featurefiles with no config. Each scenario runs as a test, and each row of a scenario outline’s examples runs as its own test. Each step phrase maps to a Doc Detective action. You don’t write step definitions. See Gherkin input format. - The
cucumberreporter writescucumber.json, which Xray, Allure, and other test-management tools import. See Read the Cucumber report. - A
runOnentry takes amatrixof values, and a test runs once for each combination of the keys its steps reference as$$matrix.<key>. List the values inline, or load them from a JSON array file or a sitemap’s<loc>entries. Use it to run one test against every page of a site or every locale. See Run once per value withmatrix. mockRequestanswers in sequence withresponses, where the last response repeats, and replays recorded responses from a HAR file withharPath. See Answer in sequence and Replay recorded responses.- Screenshot comparison has new controls:
masklists elements whose pixels don’t count when Doc Detective compares a screenshot with its reference image, such as a clock or an ad. See Ignore parts that change.threshold, from0to1, sets how different a pixel’s color must be to count as changed.maxDiffPixelscaps the number of changed pixels alongsidemaxVariation. Seescreenshot.- When any pixels differ, the step writes a diff image and a copy of the previous reference image to the run folder. See Read what changed.
- Screenshot capture has new options.
fullPagecaptures the whole scrollable page.animations: "disabled"stops the page’s motion for the capture.stablewaits until the page stops changing.styleapplies CSS only for the capture, such as to hide a chat widget. Seescreenshot. - The
--overwrite-screenshotsflag and theoverwriteScreenshotsconfig key set every screenshot step’soverwritefor a run, so you can accept a redesign without editing each step. See Accept a redesign in one run.
v5.7.0
New features
- The
mockRequestaction answers matching browser requests with a response you define, until the test ends. The request never reaches the server. Use it to show stable data in screenshots or to test how a page handles an error. Filter by URL glob and, optionally, by HTTP method.mockRequestworks in Chrome. Other browsers skip the step. - The
saveStateandloadStateactions save the open site’s cookies andlocalStorageto a JSON file and load them in a later test. You then sign in once instead of in every test. The file uses Playwright’sstorageStateformat.saveStatedoesn’t replace an existing file unless you setoverwrite. The file holds live session cookies and tokens, so keep it out of version control and uploaded CI artifacts. See Pages behind a sign-in. - The
totp(secret)expression returns the current one-time code for a base32 secret, the code an authenticator app shows. A test can then sign in to an account that uses two-factor authentication. See Function operators and Sign in with a one-time code. - A context’s browser can set what the page sees about the user’s device:
colorScheme,locale,timezone,deviceScaleFactor,reducedMotion, andclock. Chrome sets every key, and Firefox sets every key excepttimezoneandclock. A context that asks for a key its browser can’t set reportsSKIPPED. See Page emulation.
v5.6.3
Bug fixes
- Interrupting a run, such as with Ctrl+C, while Doc Detective builds WebDriverAgent for iOS now stops the
xcodebuildprocess. Before, the build kept running after Doc Detective exited and left its build lock behind. This covers the first-use build during a test run anddoc-detective install ios. After an interrupt, Doc Detective starts no more builds and opens no more iOS sessions.
v5.6.0
New features
- iOS tests on macOS now build WebDriverAgent on first use. If no cached build matches the current Xcode version and driver, the test builds one before it starts. The build goes into the cache. Previously, only
doc-detective install ios --yesfilled the cache, and otherwise Appium compiled its own copy during the session. The first-use build can take about 10 minutes, and Doc Detective warns in the terminal and the report while it runs. If the build fails, the test still runs and Appium builds WebDriverAgent during the session. To keep the build out of test runs, such as in a CI setup step, rundoc-detective install ios --yesbeforehand. To turn off the first-use build, set theDOC_DETECTIVE_NO_IOS_AUTOINSTALLenvironment variable to1. See WebDriverAgent builds on first use.
v5.5.0
New features
- Doc Detective resolves include directives by default before it looks for tests. A test in a shared snippet runs inside each page that includes it, in reading order. It reads AsciiDoc
include::, MkDocs snippets, mdBook{{#include}}, Fern<Markdown src>, MDX snippet imports for Docusaurus, Mintlify, Starlight, and Astro, and reStructuredText.. include::. See Includes. - A
fileTypesentry acceptsincludeStatements, a list of regular expressions for include syntax that Doc Detective doesn’t know. See Includes.
v5.4.0
New features
- Doc Detective tests reStructuredText (
.rst) files with no extra config. Inline statements are RST comments, such as.. test {...},.. step {...}, and.. test end. With step detection on, links, bold text, images, and code blocks become steps, and nothing inside code, literals, or raw blocks does.rstis part of the defaultfileTypeslist. See input formats.
v5.3.1
Bug fixes
- The official Docker image keeps the browsers it ships with instead of downloading newer ones on each run.
- The iOS driver installs on its own, so a failed iOS driver build no longer stops Appium and the browser drivers from installing.
v5.3.0
New features
v5.2.0
New features
- Added the
validatecommand, which checks spec files and inline tests without running them, as indoc-detective validate ./docs. It exits0when every test is valid,1when any test is invalid, and2for a usage error, a bad config, or no tests found. Pass--jsonfor a machine-readable list of each file and its errors. Like every other output,validateoutput masks environment variable values. See the CLI reference.
v4.43.1
This is a patch release for the version 4 line, published after v5.0.0. To stay on version 4, pin it, as in npx doc-detective@4.
v5.0.0
Doc Detective 5 makes a failed test fail the run, separates results from logs, and checks specs strictly. Before you upgrade, read Upgrade to Doc Detective 5. It lists every breaking change and what to do about each one. To stay on version 4 for now, pin it, as in npx doc-detective@4.
To migrate from Doc Detective 4:
v4.43.0
New features
- Config files, specs, and tests accept
publicVariables, a list of environment variable names. Doc Detective 5 masks environment variable values in output, andpublicVariableslists the exceptions. Version 4 doesn’t mask values, so you can add the key before you upgrade. See Upgrade to Doc Detective 5.
v4.42.1
Maintenance release; no user-facing changes.
v4.42.0
This release prepares version 4 users for Doc Detective 5 and changes how Doc Detective guards local URLs. See Upgrade to Doc Detective 5.
v4.41.6
Bug fixes
- Hints printed after a run now link to live documentation pages. Previously, many links led to the docs home page or to pages that no longer exist.
v4.41.5
Maintenance release; no user-facing changes.
v4.41.4
This is the first version published to npm after v4.38.1. It includes the changes listed for v4.38.2 through v4.41.3, which were tagged but not published.
v4.41.3
This version was tagged but not published to npm. Its changes first shipped in v4.41.4.
v4.41.2
This version was tagged but not published to npm. Its changes first shipped in v4.41.4.
v4.41.1
This version was tagged but not published to npm. Its changes first shipped in v4.41.4.
Maintenance release; no user-facing changes.