From 96bfa522943704749c8ffd8ac5703bbc8eefeaa0 Mon Sep 17 00:00:00 2001 From: Asish Kumar Date: Fri, 29 Aug 2025 13:04:46 +0000 Subject: [PATCH] feat: new flags in report cmd Signed-off-by: Asish Kumar --- .../running-keploy/cli-commands.md | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md index df8881427..a063b8dcf 100755 --- a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md +++ b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md @@ -30,7 +30,7 @@ Here are some examples of how to use some common flags: | `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` | | `normailze` | `-p, --path`, `--test-run`, `--tests` | | `rerecord` | `--test-sets`, `-t` | -| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` | +| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--full`, `--summary`, `--test-case, --tc` | | `config` | `--generate`,`-p, --path` | ## [record](#record) @@ -326,7 +326,7 @@ This is useful if your application takes some time to start (for example, when r ## [report](#report) -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. +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. Usage: @@ -336,7 +336,7 @@ keploy report [flags] Available flags: -- `-t, --test-sets strings` - Testsets to report, e.g., `--test-sets "test-set-1, test-set-2"`. +- `-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. ```bash keploy report -t "test-set-1" @@ -348,18 +348,37 @@ keploy report [flags] keploy report -p "./keploy-tests" ``` -- `--report-path string` - Absolute path to a specific report file to display results from. +- `--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`. ```bash keploy report --report-path "/home/user/my-app/keploy/reports/test-run-1.yaml" ``` -- `--body` - Show full expected/actual body diffs (colorized for JSON) instead of the default compact table diff. +- `--full` - Show full diffs instead of the default compact table view. For JSON bodies, this produces colorized expected/actual comparisons. ```bash - keploy report -t "test-set-1" --body + 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`. + + ```bash + keploy report --summary + ``` + +- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs. + + ```bash + keploy report --test-case "test-1" + ``` + +> **Notes** +> +> - 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`. +> - When `--report-path` is provided, Keploy reads that file directly. Legacy files that contain only a `tests` list are supported. + ## [templatize](#templatize) 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.