You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These tests run the same way as local tests, but Doc Detective fetches the test file from the specified URL and stores it in a temporary directory. The URL must be accessible to the machine running the tests.
373
373
374
+
## Debug mode
375
+
376
+
Doc Detective supports a debug mode that allows you to step through tests interactively and set breakpoints. This is particularly useful for debugging failing tests, understanding test execution flow, and developing new tests.
377
+
378
+
### Configuration
379
+
380
+
Configure debug mode using the `debug` property in your configuration:
381
+
382
+
```json
383
+
{
384
+
"input": "tests/",
385
+
"debug": false
386
+
}
387
+
```
388
+
389
+
```json
390
+
{
391
+
"input": "tests/",
392
+
"debug": true
393
+
}
394
+
```
395
+
396
+
```json
397
+
{
398
+
"input": "tests/",
399
+
"debug": "stepThrough"
400
+
}
401
+
```
402
+
403
+
### Debug options
404
+
405
+
-`false` (default): Disables all debugging
406
+
-`true`: Allows pausing on breakpoints, waiting for user input before continuing
407
+
-`"stepThrough"`: Pauses at every step, waiting for user input before continuing
408
+
409
+
### Step-level breakpoints
410
+
411
+
You can set breakpoints directly on individual steps using the `breakpoint` property:
412
+
413
+
```json
414
+
{
415
+
"tests": [
416
+
{
417
+
"steps": [
418
+
{
419
+
"description": "Normal step",
420
+
"wait": 1000
421
+
},
422
+
{
423
+
"description": "Debug this step",
424
+
"breakpoint": true,
425
+
"click": "#submit"
426
+
}
427
+
]
428
+
}
429
+
]
430
+
}
431
+
```
432
+
374
433
## Read the results
375
434
376
435
Doc Detective outputs test results to a `testResults-<timestamp>.json` file in your `output` directory. You can also specify your output directory with the `--output` flag:
Copy file name to clipboardExpand all lines: docs/references/schemas/config.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ Configuration options for Doc Detective operations.
7
7
8
8
Field | Type | Description | Default
9
9
:-- | :-- | :-- | :--
10
-
$schema | string | Optional. JSON Schema for this object.<br/><br/>Accepted values: `https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/config_v3.schema.json` |
11
10
configId | string | Optional. Identifier for the configuration. |
12
11
configPath | string | ReadOnly. Path to the configuration file. |
13
12
input | one of:<br/>- string<br/>- array of string | Optional. Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files. | `.`
@@ -19,13 +18,13 @@ origin | string | Optional. Default protocol and domain to use for relative URLs
19
18
beforeAny | one of:<br/>- string<br/>- array of string | Optional. Path(s) to test specifications to perform before those specified by `input`. Useful for setting up testing environments. |
20
19
afterAll | one of:<br/>- string<br/>- array of string | Optional. Path(s) to test specifications to perform after those specified by `input`. Useful for cleaning up testing environments. |
21
20
detectSteps | boolean | Optional. Whether or not to detect steps in input files based on defined markup. | `true`
22
-
allowUnsafeSteps | boolean | Optional. Whether or not to run potentially unsafe steps, such as those that might modify files or system state. |
23
21
logLevel | string | Optional. Amount of detail to output when performing an operation.<br/><br/>Accepted values: `silent`, `error`, `warning`, `info`, `debug` | `info`
22
+
debug | one of:<br/>- boolean<br/>- string | Optional. Enable debugging mode. `true` allows pausing on breakpoints, waiting for user input before continuing. `"stepThrough"` pauses at every step, waiting for user input before continuing. `false` disables all debugging.<br/><br/>Accepted values: `false`, `true`, `"stepThrough"` | `false`
24
23
runOn | array of object([context](/docs/references/schemas/context)) | Optional. Contexts to run the test in. Overrides contexts defined at the config and spec levels. |
25
-
fileTypes | array of one of: string, object([File type (custom)](/docs/references/schemas/file-type-custom)), object([File type (executable)](/docs/references/schemas/file-type-executable)) | Optional. Configuration for file types and their markup detection. | ``["markdown","asciidoc","html"]``
26
-
integrations | object([Integrations options](/docs/references/schemas/integrations-options)) | Optional. Options for connecting to external services. |
27
-
telemetry | object([Telemetry options](/docs/references/schemas/telemetry-options)) | Optional. Options around sending telemetry for Doc Detective usage. | ``{"send":true}``
28
-
environment | object([Environment details](/docs/references/schemas/environment-details)) | ReadOnly. Environment information for the system running Doc Detective. |
24
+
fileTypes | array of one of: string, object([File type (custom)](/docs/references/schemas/File%20type%20(custom))), object([File type (executable)](/docs/references/schemas/File%20type%20(executable))) | Optional. Configuration for file types and their markup detection. | ``["markdown","asciidoc","html"]``
25
+
integrations | object([Integrations options](/docs/references/schemas/Integrations%20options)) | Optional. Options for connecting to external services. |
26
+
telemetry | object([Telemetry options](/docs/references/schemas/Telemetry%20options)) | Optional. Options around sending telemetry for Doc Detective usage. | ``{"send":true}``
27
+
environment | object([Environment details](/docs/references/schemas/Environment%20details)) | ReadOnly. Environment information for the system running Doc Detective. |
0 commit comments