File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff 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
2755Congratulations! You've run your first test with Doc Detective.
You can’t perform that action at this time.
0 commit comments