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

Configure CI::Reporter::Cucumber formatter as non STDOUT formats #14

Open
sleungcy opened this issue Feb 3, 2016 · 2 comments
Open

Comments

@sleungcy
Copy link

sleungcy commented Feb 3, 2016

Is there a way to configure this formatter as a non-STDOUT formatter? I want to use this formatter to output the xml reports, as well as having the test results piped onto the console as well.

However, it looks to me cucumber only accepts at most 1 formatter that uses STDOUT, as seen in the cucumber code below.

https://github.com/cucumber/cucumber-ruby/blob/646cfe7e5534b32aed6ff3046a889ad069955940/lib/cucumber/cli/options.rb#L388

@sleungcy
Copy link
Author

sleungcy commented Feb 3, 2016

Actually, I don't think it uses stdout at all? If that's the case, it's output should be set.
sleungcy@b39e45f

@shepmaster
Copy link
Member

@sleungcy If I'm understanding you correctly:

The default Rake invocation of CI::Reporter::Cucumber does not pass an -o option in conjunction with the formatter when the cucumber binary is run.

This means that Cucumber thinks that CI::Reporter will be reporting to stdout. Since only one thing is allowed to write to stdout, this disables the built-in console formatter.

You'd like to be able to use both CI::Reporter and the console formatter concurrently.

I don't think that the proposed solution of -o /dev/null is appropriate as it is Linux-specific. It's also a bit misleading, as the output isn't going to /dev/null. What would be better is if we actually used the -o setting appropriately, perhaps as the base directory of all the files.

This will require a change to ReportManager as well as CI::Reporter::Cucumber. Plus some investigation to understand exactly what the io parameter is.

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

2 participants