Skip to content

Commit a9b6eca

Browse files
feat: new flags in report cmd (#637)
Signed-off-by: Asish Kumar <[email protected]>
1 parent c7d9e58 commit a9b6eca

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

versioned_docs/version-3.0.0/running-keploy/cli-commands.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ This is useful if your application takes some time to start (for example, when r
327327

328328
## [report](#report)
329329

330-
The `report` command in Keploy is used to display a detailed summary of test results. It provides a human-readable diff for failed test cases from the latest test run or a specified report file.
330+
The `report` command in Keploy is used to display a detailed summary of test results. It can show a compact table-style diff or full body diffs (with colorized JSON), and it can read from the latest test run or a specific report file.
331331

332332
<b> Usage: </b>
333333

@@ -337,7 +337,7 @@ keploy report [flags]
337337

338338
<b> Available flags: </b>
339339

340-
- `-t, --test-sets strings` - Testsets to report, e.g., `--test-sets "test-set-1, test-set-2"`.
340+
- `-t, --test-sets strings` - Testsets to report, e.g., `--test-sets "test-set-1, test-set-2"`. If omitted, all test sets in the latest run are considered.
341341

342342
```bash
343343
keploy report -t "test-set-1"
@@ -349,42 +349,37 @@ keploy report [flags]
349349
keploy report -p "./keploy-tests"
350350
```
351351

352-
- `--report-path string` - Absolute path to a specific report file to display results from.
352+
- `--report-path, -r string` - **Absolute** path to a specific report file to display results from (must point to a file, not a directory). You can still combine this with other flags like `--summary` or `--test-case`.
353353

354354
```bash
355355
keploy report --report-path "/home/user/my-app/keploy/reports/test-run-1.yaml"
356356
```
357357

358-
- `--body` - Show full expected/actual body diffs (colorized for JSON) instead of the default compact table diff.
358+
- `--full` - Show full diffs instead of the default compact table view. For JSON bodies, this produces colorized expected/actual comparisons.
359359

360360
```bash
361-
keploy report -t "test-set-1" --body
361+
keploy report -t "test-set-1" --full
362362
```
363363

364-
## [sanitize](#sanitize)
365-
366-
The `sanitize` command helps remove sensitive data from recorded test cases. It scans test files for potential secrets (like API keys, tokens, etc.), replaces them with template placeholders, and stores the original values in a separate `secret.yaml` file. This allows for sharing test cases without exposing sensitive information.
367-
368-
<b> Usage: </b>
369-
370-
```bash
371-
keploy sanitize [flags]
372-
```
373-
374-
<b> Available flags: </b>
375-
376-
- `-t, --test-sets strings` - Testsets to sanitize, e.g., `-t "test-set-1, test-set-2"`. If not specified, all test sets will be sanitized.
364+
- `--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`.
377365

378366
```bash
379-
keploy sanitize -t "test-set-1"
367+
keploy report --summary
380368
```
381369

382-
- `-p, --path string` - Path to the local directory where generated testcases/mocks are stored. Default is ".".
370+
- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs.
383371

384372
```bash
385-
keploy sanitize -p "./keploy-tests"
373+
keploy report --test-case "test-1"
386374
```
387375

376+
> **Notes**
377+
>
378+
> - By default, `report` shows only **failed** tests with a compact, human-readable diff (status, headers—including trailers/content-length where applicable—and body changes).
379+
> - Use `--full` to see the complete expected vs actual bodies (with JSON colorization).
380+
> - `--summary` prints just the totals and a per–test-set table, optionally restricted with `-t/--test-sets`.
381+
> - When `--report-path` is provided, Keploy reads that file directly. Legacy files that contain only a `tests` list are supported.
382+
388383
## [templatize](#templatize)
389384

390385
The `templatize` cmd allows the user to templatize important fields in the testcases who's values are used in the request of testcases and that may change in the future.

0 commit comments

Comments
 (0)