Skip to content

feat(test): add --output (text/json/yaml/github-actions) for machine-readable results - #488

Merged
Harsh4902 merged 1 commit into
microcks:masterfrom
Caesarsage:feat/test-output
Aug 12, 2026
Merged

feat(test): add --output (text/json/yaml/github-actions) for machine-readable results#488
Harsh4902 merged 1 commit into
microcks:masterfrom
Caesarsage:feat/test-output

Conversation

@Caesarsage

Copy link
Copy Markdown
Contributor

Adds --output to microcks test, with four formats:

Value Output
text (default) Human-readable summary (unchanged default behaviour)
json Full TestResult as JSON
yaml Full TestResult as YAML
github-actions GitHub Actions annotations + log groups + job step summary

Works for both the normal server path and --dry-run, since it's wired into the
shared test engine (runTestAndWait).

github-actions format

  • ::group:: / ::endgroup:: log-folding per operation
  • ::error:: per failing step, with the validation message
  • ::error file=<spec>,line=<n>:: when the local spec is known (--dry-run --artifact),
    mapping the failing operation to its line so the annotation lands on the diff
  • ::notice:: for passing operations, gated by MICROCKS_ACTIONS_VERBOSE
  • A per-operation markdown table appended to $GITHUB_STEP_SUMMARY

Tests

  • Unit tests for all four formatters, the github-actions escaping, the step
    summary, and the OpenAPI line-mapping (pkg/output).

Notes

@Caesarsage

Copy link
Copy Markdown
Contributor Author

/hold

Working on a structure logger and helper function from last mentorship call

Comment thread pkg/output/yaml_formatter.go Outdated
Comment thread pkg/output/openapi_linemap.go Outdated
Comment thread pkg/output/openapi_linemap.go Outdated
Comment thread pkg/output/openapi_linemap.go Outdated
@Caesarsage

Copy link
Copy Markdown
Contributor Author

if #489 or #490 or #491 gets merge, I will rework this PR to use the new error format

Harsh4902
Harsh4902 previously approved these changes Jul 30, 2026

@Harsh4902 Harsh4902 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New dependancies are in place. GTG

@Harsh4902
Harsh4902 self-requested a review July 30, 2026 16:26
@Vaishnav88sk

Copy link
Copy Markdown

I think the review comments are still not resolved. After that 👍🏻

@Caesarsage

Copy link
Copy Markdown
Contributor Author

I think the review comments are still not resolved. After that 👍🏻

Yes, once the other PRs are merged, I will rebase and rework attending to your reviews. this is so as to avoid many conflicts. As stated here.

#488 (comment)

@Vaishnav88sk Vaishnav88sk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Last fix please!! 🙂

Comment thread pkg/connectors/microcks_client.go
@Caesarsage

Copy link
Copy Markdown
Contributor Author

Thank you for the review. I have updated it @Vaishnav88sk

Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
@Vaishnav88sk

Copy link
Copy Markdown

LGTM @Harsh4902

@Vaishnav88sk

Copy link
Copy Markdown

Thanks for the contribution!! @Caesarsage

@Harsh4902
Harsh4902 dismissed Vaishnav88sk’s stale review August 12, 2026 15:40

Dismissing this as @Vaishnav88sk' has commented LGTM

@Harsh4902 Harsh4902 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good to go. Thanks @Caesarsage and @Vaishnav88sk

@Harsh4902
Harsh4902 merged commit c9e98ac into microcks:master Aug 12, 2026
6 checks passed
@Harsh4902 Harsh4902 added component/cli lfx-mentorship PR/Issue which is part of LFX mentorship labels Aug 12, 2026
@Harsh4902 Harsh4902 added this to the Next milestone Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/cli lfx-mentorship PR/Issue which is part of LFX mentorship

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants