Skip to content

feat(AIENG-453): Add view command to display historical test data and insights#1299

Merged
psakthivel04 merged 1 commit into
mainfrom
main-cli-test
May 19, 2026
Merged

feat(AIENG-453): Add view command to display historical test data and insights#1299
psakthivel04 merged 1 commit into
mainfrom
main-cli-test

Conversation

@psakthivel04
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

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

Adds a new view command group to the Smart Tests CLI to fetch and print historical test insights from the API (test execution results and flaky-test weekly scores), along with test coverage for common query/filter options.

Changes:

  • Introduces view test-results with filtering/pagination options and JSON output.
  • Introduces view flaky-tests with ISO-week / date-range filters and JSON output.
  • Wires the new view group into the CLI entrypoint and adds dedicated command tests.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
smart_tests/commands/view/__init__.py Adds the view command group and registers subcommands.
smart_tests/commands/view/test_results.py Implements view test-results command and its query params / error handling.
smart_tests/commands/view/flaky_tests.py Implements view flaky-tests command, including --year-week validation and query params.
smart_tests/__main__.py Registers the new view command group with the top-level CLI.
tests/commands/test_view_test_results.py Adds CLI tests for view test-results filters, pagination, and error cases.
tests/commands/test_view_flaky_tests.py Adds CLI tests for view flaky-tests filters and error cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/commands/test_view_test_results.py Outdated
Comment thread smart_tests/commands/view/flaky_tests.py
Copy link
Copy Markdown
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

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

The changes look good to me.

One thing: could you add the API schema file to this repo and add a command to save the API schema locally, similar to this implementation https://github.com/cloudbees-oss/smart-tests-cli/blob/main/smart_tests/commands/get/docs.py?

@Konboi
Copy link
Copy Markdown
Contributor

Konboi commented May 13, 2026

Of course, this can be handled in another PR.

Copy link
Copy Markdown
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

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

Not to block your task, I'll approve this PR

@psakthivel04 psakthivel04 merged commit fad8717 into main May 19, 2026
3 checks passed
@psakthivel04 psakthivel04 deleted the main-cli-test branch May 19, 2026 06:26
@github-actions github-actions Bot mentioned this pull request May 19, 2026
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.

3 participants