Skip to content

Commit 00801d7

Browse files
committed
Update installation instructions in documentation
- Added detailed steps for saving a sample test file as _sample.spec.json_. - Updated the command to run a test with the correct input file.
1 parent f545d52 commit 00801d7

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

docs/get-started/installation.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,38 @@ Downloading and running Doc Detective is straightforward. Follow these steps to
1818

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

21-
3. Run a test:
21+
3. Save this file to your current directory as _sample.spec.json_:
22+
23+
```json
24+
{
25+
"tests": [
26+
{
27+
"steps": [
28+
{
29+
"description": "Go to the specified URL",
30+
"goTo": "https://example.com"
31+
},
32+
{
33+
"description": "Verify the presence of the main heading",
34+
"find": "Example Domain"
35+
},
36+
{
37+
"description": "Verify that the 'More information...' link is present and working",
38+
"click": "More information..."
39+
},
40+
{
41+
"description": "Capture a screenshot of the resulting page",
42+
"screenshot": "example.png"
43+
}
44+
]
45+
}
46+
]
47+
} ```
48+
49+
4. Run a test, pointing to the file you just created:
2250

2351
```bash
24-
npx doc-detective runTests --input https://doc-detective.com/sample.spec.json
52+
npx doc-detective --input sample.spec.json
2553
```
2654

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

0 commit comments

Comments
 (0)