Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Downloading and running Doc Detective is straightforward. Follow these steps to

1. Install prerequisites:

- [Node.js](https://nodejs.org/) v18 or later
- [Node.js](https://nodejs.org/) v18.20.0 or later

2. In a terminal, install Doc Detective globally:

Expand Down
53 changes: 53 additions & 0 deletions docs/get-started/installation/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_label: Installation
---

import spec from "./sample.spec.json";
import CodeBlock from '@theme/CodeBlock';

# Installation

Downloading and running Doc Detective is straightforward. Follow these steps to install Doc Detective and run your first test:

1. Install prerequisites:

- [Node.js](https://nodejs.org/) v18.20.0 or later

2. In a terminal, install Doc Detective globally:

<CodeBlock language="bash" title="Install Doc Detective">
npm i -g doc-detective
</CodeBlock>
{/* step runShell: "npm i -g doc-detective" */}

:::note

If you're working in a local copy of the `doc-detective` repository, you need to run `npm i` to install local dependencies.

:::

3. Save this file to your current directory as _sample.spec.json_:

<CodeBlock language="json" title="sample.spec.json">
{JSON.stringify(spec, null, 2)}
</CodeBlock>

4. Run a test, pointing to the file you just created:

<CodeBlock language="bash" title="Run test">
npx doc-detective --input sample.spec.json
</CodeBlock>
{/* step runShell:
command: "npx doc-detective --input sample.spec.json"
workingDirectory: "." */}


Congratulations! You've run your first test with Doc Detective. :tada:

You should see output in the terminal indicating the progress and results of the test. Results are also saved in a `testResults-<timestamp>.json` file in the current directory (configurable with the `--output` option), and this test saves a screenshot to example.png:

[![Sample test screenshot](./example.png)](./example.png)

## Next steps

Next up, take a look at some of the [concepts](/docs/get-started/concepts) native to Doc Detective, check out some of the guided [tutorials](/docs/category/tutorials), or explore how to write [tests](/docs/get-started/tests) and [actions](/docs/category/actions) to automate your documentation testing.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@mui/material": "^7.3.1",
"clsx": "^2.1.1",
"doc-detective-common": "^3.3.0",
"docusaurus-json-schema-plugin": "^1.15.0",
"dotenv": "^17.2.1",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
Expand Down Expand Up @@ -75,6 +76,6 @@
]
},
"engines": {
"node": ">=18.0"
"node": ">=18.20.0"
}
}