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
13 changes: 13 additions & 0 deletions versioned_docs/version-3.0.0/running-keploy/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@
| `sanitize` | `--test-sets, -t`, `-p, --path` |
| `config` | `--generate`,`-p, --path` |

### Module-level Debug Filtering

`--debug` enables debug logs. To filter debug logs by module, set `debugModules` in the config file:

```yaml
debug: true
debugModules:
include: ["proxy", "record"]
exclude: ["proxy.mysql"]
```

See the [Configuration File](configuration-file) doc for details and hierarchical matching behavior.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link reference is incomplete. It should point to the specific section within the configuration file documentation. Update the link to include the anchor: [Configuration File](configuration-file#debug-logging) to ensure users are directed to the relevant Debug Logging section.

Suggested change
See the [Configuration File](configuration-file) doc for details and hierarchical matching behavior.
See the [Configuration File](configuration-file#debug-logging) doc for details and hierarchical matching behavior.

Copilot uses AI. Check for mistakes.

## [record](#record)

The `record` mode in Keploy allows the user to record Keploy testcases from the API calls. The recorded testcases and generated mocks are then saved in the `keploy` directory in the current working directory.
Expand All @@ -58,7 +71,7 @@

In the command above, `node src/app.js` is the command which starts the user application.

- `--config-path string` - Path to the Keploy configuration file. The default is ".".

Check failure on line 74 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L74

[Google.Quotes] Commas and periods go inside quotation marks.
Raw output
{"message": "[Google.Quotes] Commas and periods go inside quotation marks.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 74, "column": 82}}}, "severity": "ERROR"}

```bash
keploy record -c "node src/app.js" --config-path "./config-dir/"
Expand Down Expand Up @@ -125,7 +138,7 @@

## [test](#test)

The `test` mode in Keploy allows the user to run the recoded testcases from the API calls and execute assertion. A detailed report is produced after the tests are executed and it's then saved in the yaml format in `keploy/reports` directory in the current working directory.

Check failure on line 141 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L141

[Vale.Spelling] Did you really mean 'yaml'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'yaml'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 141, "column": 200}}}, "severity": "ERROR"}

<b> Usage: </b>

Expand All @@ -149,7 +162,7 @@

In the command above, `node src/app.js` is the command which starts the user application.

- `--config-path string` - Path to the Keploy configuration file. The default is ".".

Check failure on line 165 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L165

[Google.Quotes] Commas and periods go inside quotation marks.
Raw output
{"message": "[Google.Quotes] Commas and periods go inside quotation marks.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 165, "column": 82}}}, "severity": "ERROR"}

```bash
keploy test -c "node src/app.js" --config-path "./config-dir/"
Expand All @@ -169,7 +182,7 @@
keploy test -c "node src/app.js" --delay 10
```

- `--mongo-password string` - Authentication password for mocking MongoDB connection. The default password is "default123".

Check failure on line 185 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L185

[Google.Quotes] Commas and periods go inside quotation marks.
Raw output
{"message": "[Google.Quotes] Commas and periods go inside quotation marks.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 185, "column": 111}}}, "severity": "ERROR"}

```bash
keploy test -c "node src/app.js" --mongo-password "my-password"
Expand Down Expand Up @@ -237,25 +250,25 @@

- `--jacoco-agent-path` - Only applicable for test coverage for Java projects. You can override the jacoco agent jar by providing its path

- `--proto-dir string` - Path of the directory where all protos of a service are located. Used for GRPC test cases to enable better deterministic and proper comparison of protobuf responses.

Check failure on line 253 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L253

[Vale.Spelling] Did you really mean 'protos'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'protos'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 253, "column": 58}}}, "severity": "ERROR"}

Check failure on line 253 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L253

[Vale.Spelling] Did you really mean 'protobuf'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'protobuf'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 253, "column": 172}}}, "severity": "ERROR"}

```bash
keploy test -c "node src/app.js" --proto-dir "./protos"
```

- `--proto-file string` - Path of main proto file. Used for GRPC test cases to enable better deterministic and proper comparison of protobuf responses. Either `--proto-file` or `--proto-dir` must be provided for GRPC tests.

Check failure on line 259 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L259

[Vale.Spelling] Did you really mean 'proto'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'proto'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 259, "column": 40}}}, "severity": "ERROR"}

Check failure on line 259 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L259

[Vale.Spelling] Did you really mean 'protobuf'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'protobuf'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 259, "column": 133}}}, "severity": "ERROR"}

```bash
keploy test -c "node src/app.js" --proto-file "./protos/main.proto"
```

- `--proto-include stringArray` - Path of directories to be included while parsing import statements in proto files. This is optional and used for GRPC test cases when proto files have import dependencies.

Check failure on line 265 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L265

[Vale.Spelling] Did you really mean 'proto'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'proto'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 265, "column": 105}}}, "severity": "ERROR"}

```bash
keploy test -c "node src/app.js" --proto-file "./protos/main.proto" --proto-include "./protos/common,./protos/shared"
```

> **Note for GRPC Tests:** When running GRPC test cases, it's recommended to provide proto information using either `--proto-file` or `--proto-dir` flags. If proto information is not provided, Keploy will use basic canonical matching of the protoscopic textual format of GRPC response body, which may be less accurate than proto-based comparison.

Check failure on line 271 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L271

[Vale.Spelling] Did you really mean 'proto'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'proto'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 271, "column": 86}}}, "severity": "ERROR"}

Check failure on line 271 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L271

[Vale.Spelling] Did you really mean 'proto'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'proto'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 271, "column": 159}}}, "severity": "ERROR"}

Check failure on line 271 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L271

[Vale.Spelling] Did you really mean 'protoscopic'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'protoscopic'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 271, "column": 242}}}, "severity": "ERROR"}

## [gen](#gen)

Expand Down Expand Up @@ -287,11 +300,11 @@

- `testDir` - Directory where tests will be written.

- `llmBaseUrl` - Base url of the llm.

Check failure on line 303 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L303

[Vale.Spelling] Did you really mean 'llm'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'llm'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 303, "column": 34}}}, "severity": "ERROR"}

- `model` - Specifies the AI model to use by default it uses "gpt-4o" model.

- `llmApiVersion` - API version of the llm if any.

Check failure on line 307 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L307

[Vale.Spelling] Did you really mean 'llm'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'llm'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 307, "column": 40}}}, "severity": "ERROR"}

## [normalize](#normalize)

Expand Down Expand Up @@ -335,7 +348,7 @@

## [rerecord](#rerecord)

The `rerecord` command allows users to record new Keploy test cases and mocks from existing test cases for the given testset(s).

Check failure on line 351 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L351

[Google.OptionalPlurals] Don't use plurals in parentheses such as in 'testset(s)'.
Raw output
{"message": "[Google.OptionalPlurals] Don't use plurals in parentheses such as in 'testset(s)'.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 351, "column": 118}}}, "severity": "ERROR"}

**Usage:**

Expand Down Expand Up @@ -377,7 +390,7 @@
keploy report -t "test-set-1"
```

- `-p, --path string` - Path to the local directory where generated testcases/mocks are stored. Default is ".".

Check failure on line 393 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L393

[Google.Quotes] Commas and periods go inside quotation marks.
Raw output
{"message": "[Google.Quotes] Commas and periods go inside quotation marks.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 393, "column": 108}}}, "severity": "ERROR"}

```bash
keploy report -p "./keploy-tests"
Expand All @@ -395,7 +408,7 @@
keploy report -t "test-set-1" --full
```

- `--summary` - Print only a summarized view (grand totals and per–test-set table with time taken). Useful for a quick dashboard-style overview. Can be combined with `-t/--test-sets` and `--report-path`.

Check failure on line 411 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L411

[Google.EnDash] Use an em dash ('—') instead of '–'.
Raw output
{"message": "[Google.EnDash] Use an em dash ('—') instead of '–'.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 411, "column": 67}}}, "severity": "ERROR"}

```bash
keploy report --summary
Expand All @@ -411,7 +424,7 @@
>
> - By default, `report` shows only **failed** tests with a compact, human-readable diff (status, headers—including trailers/content-length where applicable—and body changes).
> - Use `--full` to see the complete expected vs actual bodies (with JSON colorization).
> - `--summary` prints just the totals and a per–test-set table, optionally restricted with `-t/--test-sets`.

Check failure on line 427 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L427

[Google.EnDash] Use an em dash ('—') instead of '–'.
Raw output
{"message": "[Google.EnDash] Use an em dash ('—') instead of '–'.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 427, "column": 49}}}, "severity": "ERROR"}
> - When `--report-path` is provided, Keploy reads that file directly. Legacy files that contain only a `tests` list are supported.

## [templatize](#templatize)
Expand Down Expand Up @@ -442,7 +455,7 @@
keploy config --generate
```

- `-p, --path string` - Path to the local directory where the Keploy Configuration File will be stored. The default is ".".

Check failure on line 458 in versioned_docs/version-3.0.0/running-keploy/cli-commands.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/cli-commands.md#L458

[Google.Quotes] Commas and periods go inside quotation marks.
Raw output
{"message": "[Google.Quotes] Commas and periods go inside quotation marks.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/cli-commands.md", "range": {"start": {"line": 458, "column": 120}}}, "severity": "ERROR"}

```bash
keploy config --generate --path "./config-dir/"
Expand Down
24 changes: 24 additions & 0 deletions versioned_docs/version-3.0.0/running-keploy/configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
proxyPort: 16789
dnsPort: 26789
debug: false
debugModules:
include: []
exclude: []
disableTele: false
inDocker: false
generateGithubActions: true
Expand Down Expand Up @@ -92,6 +95,27 @@

## Configuration Sections

### Debug Logging

The `debug` and `debugModules` settings control debug log output.

- **`debug`**: Enables debug logs. When `false`, debug logs are suppressed and `debugModules` is ignored.

- **`debugModules.include`**: Whitelist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`).

- **`debugModules.exclude`**: Blacklist of module prefixes applied after `include`.
Comment on lines +104 to +106
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "Whitelist" is considered outdated terminology. Use "Allowlist" instead, which is the modern, more inclusive term recommended in current best practices.

Suggested change
- **`debugModules.include`**: Whitelist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`).
- **`debugModules.exclude`**: Blacklist of module prefixes applied after `include`.
- **`debugModules.include`**: Allowlist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`).
- **`debugModules.exclude`**: Denylist of module prefixes applied after `include`.

Copilot uses AI. Check for mistakes.
Comment on lines +104 to +106
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "Blacklist" is considered outdated terminology. Use "Denylist" or "Blocklist" instead, which are the modern, more inclusive terms recommended in current best practices.

Suggested change
- **`debugModules.include`**: Whitelist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`).
- **`debugModules.exclude`**: Blacklist of module prefixes applied after `include`.
- **`debugModules.include`**: Allowlist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`).
- **`debugModules.exclude`**: Denylist of module prefixes applied after `include`.

Copilot uses AI. Check for mistakes.

Module names are logger prefixes (for example: `proxy`, `record`, `test`, `hooks`, `telemetry`, `proxy.http`, `proxy.mysql`). Matching is hierarchical: `proxy` matches `proxy.http` and `proxy.mysql`.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parenthetical phrase should use "e.g." instead of "for example" for consistency with formal documentation style. Alternatively, for better readability, consider restructuring as: "Module names are logger prefixes such as proxy, record, test, hooks, telemetry, proxy.http, and proxy.mysql."

Suggested change
Module names are logger prefixes (for example: `proxy`, `record`, `test`, `hooks`, `telemetry`, `proxy.http`, `proxy.mysql`). Matching is hierarchical: `proxy` matches `proxy.http` and `proxy.mysql`.
Module names are logger prefixes such as `proxy`, `record`, `test`, `hooks`, `telemetry`, `proxy.http`, and `proxy.mysql`. Matching is hierarchical: `proxy` matches `proxy.http` and `proxy.mysql`.

Copilot uses AI. Check for mistakes.

Example:

```yaml
debug: true
debugModules:
include: ["proxy", "record"]
exclude: ["proxy.mysql"]
```

### Record Section

The `record` section in the Keploy-config file allows you to define parameters for recording API calls.
Expand All @@ -108,7 +132,7 @@

- **`delay`**: Delay in seconds before recording each request. Default is 5 seconds.

- **`filters`**: API calls to the application to avoid recording. You can also control how these conditions are matched using matchType.

Check failure on line 135 in versioned_docs/version-3.0.0/running-keploy/configuration-file.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/configuration-file.md#L135

[Vale.Spelling] Did you really mean 'matchType'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'matchType'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/configuration-file.md", "range": {"start": {"line": 135, "column": 127}}}, "severity": "ERROR"}

- **`matchType (optional)`**: Determines how urlMethods and headers are evaluated.

Expand Down Expand Up @@ -244,7 +268,7 @@

### Managing Secrets with `secret.yaml`

Keploy allows you to manage sensitive information like API keys or tokens securely, without hardcoding them into your test files. This is done using a `secret.yaml` file within each test set directory.

Check failure on line 271 in versioned_docs/version-3.0.0/running-keploy/configuration-file.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/configuration-file.md#L271

[Vale.Spelling] Did you really mean 'hardcoding'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'hardcoding'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/configuration-file.md", "range": {"start": {"line": 271, "column": 93}}}, "severity": "ERROR"}

1. **Create `secret.yaml`**: Inside your test set directory (e.g., `keploy/test-set-0/`), create a file named `secret.yaml`.

Expand Down Expand Up @@ -300,7 +324,7 @@

The `global subsection` of `globalNoise` is used to define parameters that are globally ignored for all API calls during testing. It enables you to filter out consistent noise, ensuring a cleaner evaluation of responses.

**Note** - The examples below support both the xml as well as the json type responses.

Check failure on line 327 in versioned_docs/version-3.0.0/running-keploy/configuration-file.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/configuration-file.md#L327

[Vale.Spelling] Did you really mean 'xml'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'xml'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/configuration-file.md", "range": {"start": {"line": 327, "column": 48}}}, "severity": "ERROR"}

Check failure on line 327 in versioned_docs/version-3.0.0/running-keploy/configuration-file.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/configuration-file.md#L327

[Vale.Spelling] Did you really mean 'json'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'json'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/configuration-file.md", "range": {"start": {"line": 327, "column": 67}}}, "severity": "ERROR"}

```yml
globalNoise:
Expand Down
Loading