feat(AIENG-453): Add view command to display historical test data and insights#1299
Conversation
There was a problem hiding this comment.
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-resultswith filtering/pagination options and JSON output. - Introduces
view flaky-testswith ISO-week / date-range filters and JSON output. - Wires the new
viewgroup 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.
9e0329a to
5d773bb
Compare
5d773bb to
fcf9f8b
Compare
Konboi
left a comment
There was a problem hiding this comment.
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?
|
Of course, this can be handled in another PR. |
Konboi
left a comment
There was a problem hiding this comment.
Not to block your task, I'll approve this PR
No description provided.