microcks-cli
microcks-cli copied to clipboard
feat: Auto-launch browser for test results and fix CreateTestResult panic
Description
This enhancement introduces a mechanism to automatically launch the full visual report in the Microcks UI web browser instead of clicking it manually to enhance DX
It completes the "Feedback Loop" for the developer. You run the test, and the evidence opens automatically in your browser.
Changes introduced:
- test command integration: The CLI now automatically launches the system browser to the specific testResultID URL upon completion.
- Stability Fix: Refactored pkg/connectors/microcks_client.go to handle non-200 HTTP responses. Previously, the CLI would panic (crash) if the serviceId was wrong or the server had an error.
- Command-line Control: Added the --launch-browser flag to the test command.
Will this be a breaking change? No.
Implementation ideas
- Utilized the util.LaunchBrowser foundation from PR #424 .
- Added resp.StatusCode validation in the Microcks Client to ensure the CLI fails gracefully with a message instead of a panic.