{"id":13794546,"url":"https://github.com/doc-detective/doc-detective","last_synced_at":"2026-06-09T05:01:52.692Z","repository":{"id":152758726,"uuid":"591734910","full_name":"doc-detective/doc-detective","owner":"doc-detective","description":"Doc Detective is an open-source documentation testing framework that makes it easy to keep your docs accurate and up-to-date.","archived":false,"fork":false,"pushed_at":"2026-06-01T01:40:39.000Z","size":14070,"stargazers_count":123,"open_issues_count":73,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-01T03:20:26.106Z","etag":null,"topics":["docs","documentation","testing","testing-framework"],"latest_commit_sha":null,"homepage":"https://doc-detective.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doc-detective.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"docs/AGENTS.md","dco":null,"cla":null},"funding":{"github":["doc-detective"],"patreon":null,"open_collective":"doc-detective","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"polar":null,"custom":null}},"created_at":"2023-01-21T17:44:01.000Z","updated_at":"2026-05-21T21:15:56.000Z","dependencies_parsed_at":"2023-10-24T21:28:12.542Z","dependency_job_id":"e6a6fb71-5837-409d-b2d1-1f158b0909bd","html_url":"https://github.com/doc-detective/doc-detective","commit_stats":{"total_commits":582,"total_committers":6,"mean_commits":97.0,"dds":"0.022336769759450203","last_synced_commit":"0728668f20fc77c66413a654178176f6286de566"},"previous_names":[],"tags_count":144,"template":false,"template_full_name":null,"purl":"pkg:github/doc-detective/doc-detective","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doc-detective%2Fdoc-detective","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doc-detective%2Fdoc-detective/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doc-detective%2Fdoc-detective/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doc-detective%2Fdoc-detective/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doc-detective","download_url":"https://codeload.github.com/doc-detective/doc-detective/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doc-detective%2Fdoc-detective/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34092262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docs","documentation","testing","testing-framework"],"created_at":"2024-08-03T23:00:43.078Z","updated_at":"2026-06-09T05:01:52.658Z","avatar_url":"https://github.com/doc-detective.png","language":"TypeScript","funding_links":["https://github.com/sponsors/doc-detective","https://opencollective.com/doc-detective"],"categories":["Quality Assurance"],"sub_categories":[],"readme":"# \u003cimg src=\"https://github.com/doc-detective/doc-detective/blob/main/icon.png\" width=50 style=\"vertical-align:middle;margin-bottom:7px\"/\u003e Doc Detective: The Documentation Testing Framework\n\n![Current version](https://img.shields.io/github/package-json/v/doc-detective/doc-detective?color=orange)\n[![NPM Shield](https://img.shields.io/npm/v/doc-detective)](https://www.npmjs.com/package/doc-detective)\n[![Discord Shield](https://img.shields.io/badge/chat-on%20discord-purple)](https://discord.gg/2M7wXEThfF)\n[![Docs Shield](https://img.shields.io/badge/docs-doc--detective.com-blue)](https://doc-detective.com)\n\nDoc Detective is doc content testing framework that makes it easy to keep your docs accurate and up-to-date. You write tests, and Doc Detective runs them directly against your product to make sure your docs match your user experience. Whether it’s a UI-based process or a series of API calls, Doc Detective can help you find doc bugs before your users do.\n\nDoc Detective ingests test specifications and text files, parses them for testable actions, then executes those actions in a browser. The results (PASS/FAIL and context) are output as a JSON object so that other pieces of infrastructure can parse and manipulate them as needed.\n\nThis project handles test parsing and web-based UI testing---it doesn't support results reporting or notifications. This framework is a part of testing infrastructures and needs to be complemented by other components.\n\n## Components\n\nDoc Detective has multiple components to integrate with your workflows as you need it to:\n\n- Doc Detective (this repo): A standalone tool that enables testing without a separate Node project.\n- [Doc Detective Core](https://github.com/doc-detective/doc-detective-core): An NPM package that provides the testing functionality.\n- [Doc Detective Docs](https://github.com/doc-detective/doc-detective.github.io): Source files for [doc-detective.com](https://doc-detective.com).\n\n## Install\n\n1. Install prerequisites:\n\n   - [Node.js](https://nodejs.org/) (tested on v20 and v22)\n\n1. In a terminal, install Doc Detective globally:\n\n   ```bash\n   npm i -g doc-detective\n   ```\n\n   If you don't install Doc Detective globally, you'll be prompted to install the first time you run an `npx` command.\n\n   **Note:** If you're working in a cloned `doc-detective` repository, run `npm i` to install local dependencies or the `npx` command in the next step will fail.\n\n## Run tests\n\nTo run your tests, use the following command:\n\n```bash\nnpx doc-detective\n```\n\nBy default, Doc Detective scans the current directory for valid tests, but you can specify your test file with the `--input` argument. For example, to run tests in a file named `doc-content-inline-tests.md`, run the following command:\n\n```bash\nnpx doc-detective --input doc-content-inline-tests.md\n```\n\nTo customize your test, file type, and directory options, create a `.doc-detective.json` [config](https://doc-detective.com/docs/references/schemas/config.html) file. If a `.doc-detective.json` file exists in the directory when you run the comment, Doc Detective loads the config. Otherwise, you can specify a config path with the `--config` argument.\n\n```bash\nnpx doc-detective --config .doc-detective.json\n```\n\n**Note**: All paths are relative to the current working directory, regardless where the config file is located.\n\nYou can override config options with command-line arguments. For example, to run tests in a file named `tests.spec.json`, even if that isn't included in your config, run the following command:\n\n```bash\nnpx doc-detective --config .doc-detective.json --input tests.spec.json\n```\n\n### Check out some samples\n\nYou can find test and config samples in the [samples](https://github.com/doc-detective/doc-detective/tree/main/samples) directory.\n\n## Concepts\n\n- **Test specification**: A group of tests to run in one or more contexts. Conceptually parallel to a document.\n- [**Test**](https://doc-detective.com/docs/get-started/tests): A sequence of steps to perform. Conceptually parallel to a procedure.\n- **Step**: A portion of a test that includes a single action. Conceptually parallel to a step in a procedure.\n- **Action**: The task a performed in a step. Doc Detective supports a variety of actions:\n  - [**checkLink**](https://doc-detective.com/docs/get-started/actions/checkLink): Check if a URL returns an acceptable status code from a GET request.\n  - [**click**](https://doc-detective.com/docs/get-started/actions/click): Click an element with the specified text or selector.\n  - [**find**](https://doc-detective.com/docs/get-started/actions/find): Check if an element exists with the specified text or selector and optionally interact with it.\n  - [**goTo**](https://doc-detective.com/docs/get-started/actions/goTo): Navigate to a specified URL.\n  - [**httpRequest**](https://doc-detective.com/docs/get-started/actions/httpRequest): Perform a generic HTTP request, for example to an API.\n  - [**runCode**](https://doc-detective.com/docs/get-started/actions/runCode): Execute code, such as how it appears in a code block.\n  - [**runShell**](https://doc-detective.com/docs/get-started/actions/runShell): Perform a native shell command.\n  - [**screenshot**](https://doc-detective.com/docs/get-started/actions/screenshot): Take a screenshot in PNG format.\n  - [**loadVariables**](https://doc-detective.com/docs/get-started/actions/loadVariables): Load environment variables from a `.env` file.\n  - [**record**](https://doc-detective.com/docs/get-started/actions/record) and [**stopRecord**](https://doc-detective.com/docs/get-started/actions/stopRecord): Capture a video of test execution.\n  - [**type**](https://doc-detective.com/docs/get-started/actions/type): Type keys. To type special keys, begin and end the string with `$` and use the special key’s enum. For example, to type the Escape key, enter `$ESCAPE$`.\n  - [**wait**](https://doc-detective.com/docs/get-started/actions/wait): Pause before performing the next action.\n- [**Context**](https://doc-detective.com/docs/get-started/config/contexts): A combination of platform and application to run tests on.\n\n## Develop\n\nTo develop Doc Detective, clone the repo and install dependencies:\n\n```bash\ngit clone https://github.com/doc-detective/doc-detective.git\ncd doc-detective\nnpm i\n```\n\nTo run commands, use the same `npx` commands as above.\n\nMake sure you review the [contributions guide](CONTRIBUTIONS.md) before submitting a pull request.\n\n## Contributions\n\nLooking to help out? See our [contributions guide](CONTRIBUTIONS.md) for more info. If you can't contribute code, you can still help by reporting issues, suggesting new features, improving the documentation, or sponsoring the project.\n\n## License\n\nThis project uses the [AGPL-3.0 license](https://github.com/doc-detective/doc-detective/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoc-detective%2Fdoc-detective","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoc-detective%2Fdoc-detective","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoc-detective%2Fdoc-detective/lists"}