-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
puts in an After hook does not output anything #298
Conversation
You need to use $stderr.puts It's a long story :) |
@mattwynne That outputs to the terminal, but not into the HTML report which is what I'd ideally like (but I guess can live without, given that TeamCity will pick up the terminal output). I might change my approach, actually, and see if I can embed some files into the report. The specifics are that I'm writing some integration tests against AWS, and so the tests and the system-under-test both need correctly provisioned users to be able to run, and credentials. The provisioning can be automated, but not if the user running the tests doesn't at least themselves have an environment set up to have their own user. So I've captured the permissions policies into some JSON files and intend to output those if the tests fail for /cc @trevorrowe. |
OK. See cucumber/common#259 if you want some background on this. I guess the fault is that we're sending the after_scenario message to the formatter too early (before the After hooks have been run). If someone wants to look into it, that's the place to start. |
Puts in After hook doesnt print in HTML report, $stderr.puts outputs to the terminal, but not into the HTML report , Is there a way where i can output a message into HTML file |
This will not be fixed until 2.0 is released. |
Can you try this again with version 2.0.0.beta.2 ? |
Scratch that, it doesn't work yet - see the attached tests. |
This issue is now fixed (after v2.0.0.beta.3). For the HTML formatter #746 fixed the last problems. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Per this stackoverflow answer
does not actually write out anything. If there's another scenario in the file, the 1st scenario's After-hook output will appear in the 2nd scenario's flow.
I'm trying to write an
After
hook that will allow me to check why a scenario failed, and if it was a particular exception, output some useful text to tell the person how to get past it (which is unfortunately a manual step, but I'd like to be more friendly than a stack-trace).