Skip to content

Conversation

officialasishkumar
Copy link
Member

@officialasishkumar officialasishkumar commented Aug 29, 2025

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.

  • 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

This PR Resolves keploy/keploy#2930

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

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:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

@Copilot Copilot AI review requested due to automatic review settings August 29, 2025 13:05
Copy link

keploy bot commented Aug 29, 2025

To generate Unit Tests for this PR, please click here.

@github-actions github-actions bot force-pushed the feat/new-flags-report branch from 928db86 to 96bfa52 Compare August 29, 2025 13:05
Copy link

@Copilot Copilot AI left a 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` |
Copy link

Copilot AI Aug 29, 2025

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.

Suggested change
| `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.

Comment on lines 369 to 372
- `--test-case strings` (alias: `--tc`) - Filter output to specific test case IDs.

```bash
keploy report --test-case "test-1"
Copy link

Copilot AI Aug 29, 2025

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.

Suggested change
- `--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`.
Copy link

Copilot AI Aug 29, 2025

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.

Copy link
Contributor

@Achanandhi-M Achanandhi-M left a comment

Choose a reason for hiding this comment

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

LGTM

@Achanandhi-M Achanandhi-M merged commit a9b6eca into main Oct 6, 2025
5 of 7 checks passed
@Achanandhi-M Achanandhi-M deleted the feat/new-flags-report branch October 6, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature]: Add new flags in report command

3 participants