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

Cucumber logs #1458

Closed
OhadR opened this issue Oct 22, 2020 · 6 comments
Closed

Cucumber logs #1458

OhadR opened this issue Oct 22, 2020 · 6 comments

Comments

@OhadR
Copy link

OhadR commented Oct 22, 2020

tried to search here and the web for this issue, yet i could not find anything helpful... Forgive me If I missed something...

I use the latest cucumber.js. It works like a charm; all output is logged to the console output.

My question is - can it write the output also to a log file? so it can be published later on?

In my case I use AWS CodeBuild to run cucumber. After it finishes, I would like to publish the report, or at least the URL of the report (see below. BTW the reports is a great new tool!!). If I get the text below on the console and I cannot send it to developers, it is useless...

┌──────────────────────────────────────────────────────────────────────────┐
│ View your Cucumber Report at:                                            │
│ https://reports.cucumber.io/reports/ee50e816-440f-0000-0000-7ee96e40061e │
│                                                                          │
│ This report will self-destruct in 24h.                                   │
│ Keep reports forever: https://reports.cucumber.io/profile                │
└──────────────────────────────────────────────────────────────────────────┘

so how can I make cucumber write this URL to a log-file, so i can send that log-file to developers?

thanks in advance!
Ohad

@aslakhellesoy
Copy link
Contributor

Hi @OhadR

Thanks for trying out Cucumber Reports and glad you like it!

We're aware that reports are clumsy to use at the moment for the exact reason you're describing. They get a new URL every time!

We're working on fixing this (started today actually!). Soon you'll get a stable URL where all of your reports can be listed. For example https://reports.cucumber.io/github.com/myorg/myrepo. On that page you'll see all the reports (probably paginated to show the most recent 20 or so reports).

In order for this automated grouping to work you have to publish your reports from CI using your personal token.

The banner is written to STDERR so until this is live you can capture the output by redirecting that to a file:

cucumber-js .... 2> cucumber.log

@OhadR
Copy link
Author

OhadR commented Oct 22, 2020

thank you so much @aslakhellesoy ! it really sounds great!

so glad to hear you start working on this today - great minds think alike :-)

BTW feel free to drop this answer here: https://stackoverflow.com/questions/64482425/cucumber-js-logging-log-to-a-file and I will accept/upvode/etc :-)

@sergueyarellano
Copy link

sergueyarellano commented Oct 29, 2020

Started a new project today, as always I use cucumber, and to my surprise, I see that I installed an RC version. I was a little reluctant at first, but seeing the --publish feature I have to say you guys nailed it. Before that, I had to create my own artifacts in the CI and upload them to an existing storage bucket and what else.

I'm so happy about this, Thanks, people!

ps, I'm working on some tutorials on how to BDD, TDD with cucumber in case somebody wants to check https://github.com/sergueyarellano/tddpractice

;)

@OhadR
Copy link
Author

OhadR commented Nov 29, 2020

@davidjgoss why this issue is closed? the issue is solved? can i write the report to a file? ir is there a private domain the reports are writeen to?

@davidjgoss
Copy link
Contributor

@OhadR sorry, it looks like the original question re how to direct the console output to a file has been answered - what’s outstanding? Being able to generate the HTML report locally?

@OhadR
Copy link
Author

OhadR commented Dec 1, 2020

@aslakhellesoy said you guys are working on a new project: " you'll get a stable URL where all of your reports can be listed". when it will be done?

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

No branches or pull requests

4 participants