Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose report dialog for reusage during CI #2383

Open
hypr2771 opened this issue Sep 17, 2021 · 2 comments
Open

Expose report dialog for reusage during CI #2383

hypr2771 opened this issue Sep 17, 2021 · 2 comments
Labels
⚡ enhancement Request for new functionality

Comments

@hypr2771
Copy link

hypr2771 commented Sep 17, 2021

Is your feature request related to a problem? Please describe.

I am using a dockerized image running Cucumber through io.cucumber.core.cli.Main#main.
I run this dockerized image in a CI in order to run NRT on PR.
I am getting good result and steps are working as expected.

But, I am unable to catch the:

┌──────────────────────────────────────────────────────────────────────────┐
│ View your Cucumber Report at:                                            │
│ https://reports.cucumber.io/reports/b2eb92c3-fca3-4cde-af5f-d2a3f98b2d2e │
│                                                                          │
│ This report will self-destruct in 24h.                                   │
│ Keep reports forever: https://reports.cucumber.io/profile                │
└──────────────────────────────────────────────────────────────────────────┘

hence unable to extract it in order to send it to any kind of hook.

Describe the solution you'd like

In my specific case, since I am using GitHub Actions, I would love to be able to either:

  • provide some kind of --ci=github-actions which would either:
    • prepend the famous --set-output in order to use the result later on
    • set an environment variable in order to use the result later on
  • allow overriding of MessageFormatter to enable more customization

Describe alternatives you've considered

I do not know much about GitHub Actions and CI in general, so I would love to hear your alternatives 🙄

Additional context

Interacting with Cucumber message API

I tried to:

  • mount a volume on /tmp to fetch the cucumber report
  • GET https://messages.cucumber.io/api/reports and get the Location header
  • PUT the cucumber report found in /tmp against that location header

Redirecting output to a file to interact with it

One could also redirect output (which seems to be stderr by the way) of the Docker container to a file, and get the report comment by doing some kind of scripting:

grep -B2 -A5 'https://reports.cucumber.io/reports' ${DOCKER_CONTAINER_LOG_FILE} | tail -8

and the reuse that content.

Both feels a bit of a hack and I have the feeling that is not what you expect us to do.

@mpkorstanje mpkorstanje added the ⚡ enhancement Request for new functionality label Sep 22, 2021
@mpkorstanje
Copy link
Contributor

Both feels a bit of a hack and I have the feeling that is not what you expect us to do.

The online html report was a proof of concept that worked out well so it hasn't been considered beyond the basics yet.

For now grepping is probably your best option. For the long term, the current plugin system isn't suited for multiple-output targets and not very extensible. To properly fix this the plugin system would need an overhaul.

@stale
Copy link

stale bot commented Apr 14, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two months if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Apr 14, 2023
@mpkorstanje mpkorstanje removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

2 participants