-
Notifications
You must be signed in to change notification settings - Fork 244
feat: new flags in report cmd #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To generate Unit Tests for this PR, please click here. |
Signed-off-by: Asish Kumar <[email protected]>
928db86
to
96bfa52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new flags to the report
command in Keploy to provide more flexible output options. The changes enhance the reporting functionality by introducing flags for full diff display, summary view, and test case filtering.
- Replaced the
--body
flag with--full
for showing complete diffs - Added
--summary
flag for a dashboard-style overview - Added
--test-case
/--tc
flag for filtering specific test cases
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| `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` | |
Copilot
AI
Aug 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table entry shows inconsistent spacing and formatting. There should be consistent spacing around commas and the --tc
alias should be grouped with its full flag name --test-case
for clarity.
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--full`, `--summary`, `--test-case, --tc` | | |
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--full`, `--summary`, `--test-case, --tc` | |
Copilot uses AI. Check for mistakes.
- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs. | ||
|
||
```bash | ||
keploy report --test-case "test-1" |
Copilot
AI
Aug 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag description lacks sufficient detail. It should specify whether multiple test case IDs can be provided, the expected format, and provide a more comprehensive example showing multiple test cases.
- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs. | |
```bash | |
keploy report --test-case "test-1" | |
- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs. You can provide multiple IDs as a comma-separated list (e.g., `--test-case "test-1,test-2"`) or by repeating the flag (e.g., `--test-case "test-1" --test-case "test-2"`). If omitted, all test cases in the selected test sets are considered. | |
```bash | |
# Single test case | |
keploy report --test-case "test-1" | |
# Multiple test cases (comma-separated) | |
keploy report --test-case "test-1,test-2,test-3" | |
# Multiple test cases (repeated flag) | |
keploy report --test-case "test-1" --test-case "test-2" |
Copilot uses AI. Check for mistakes.
> | ||
> - 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`. |
Copilot
AI
Aug 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an incorrect en dash (–) used in 'per–test-set'. It should be a regular hyphen: 'per-test-set'.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What has changed?
This PR adds new flags to the report command in Keploy to provide more flexible output options. The changes enhance the reporting functionality by introducing flags for full diff display, summary view, and test case filtering.
This PR Resolves keploy/keploy#2930
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please run npm run build and npm run serve to check if the changes are working as expected. Please include screenshots of the output of both the commands. Add screenshots/gif of the changes if possible.
Checklist: