-
Notifications
You must be signed in to change notification settings - Fork 253
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
write output to a file #205
Comments
Hi, yes I think it is reasonable. just
The separator could be different, but I think this should be a single parameter |
I gave you the contributor access to repository, since I do not find much spare time to contribute, looking forward to community more |
not sure if you still have write access, since repository now is in cucumber org. but probably @aslakhellesoy will be able to set that up |
@l3pp4rd thanks for thinking about me, I believe you are correct, but at least I'm in the committers-go slack channel for the cucumber community now |
@lonnblad I'd really like to add writing to a file as a feature myself as there were times in the past I had wanted it. Lets make sure to follow the existing Cucumber implementations. This will unfortunately conflict with godog's existing o/out flag, but I'm okay with that as it brings it more in line with the other languages. I think this is important and want to do it as much as possible. If someone ends up transitioning from another language to go, having the implementation feel similar would be great.
|
the thing I like with l3pp4rd’s suggestion was that then I could run progress + JUnit, so I would get the feedback from progress, but JUnit as a file to be used against our test reporting |
That would still be possible. :)
|
true, nice, would both be written to the same file or two different files? |
Progress would go to stdout and junit would be written to a file |
the progress and JUnit formatters will basically support this today, since both use the basefmt and JUnit creates its summary based on the basefmt without any internal properties in the JUnit formatter |
Is there any progress on this? I see it key for CI automation, as any test generating logs in the application has to deal with parsing the output to extract junit/cucumber format from the log |
@mdelapenya not yet, I believe, I would like it though If you would use it, how would you configure it? |
I'd prefer having a junit output file to be processed by jenkins, i.e |
yep, sounds like the same use case that I have |
@jaysonesmith do you have an idea of how we link I'm thinking that in the case someone writes:
|
For me it's not a requirement having the console output, unless the console formatter flag is present too |
Should we do something similar to how the go binary works?
With this, we could also look at adding |
We have decided to implement this:
Where the |
Hi there, E:\migration\auto-go\src\features>go test -v -timeout 12h --godog.format=junit:myresults.xml --godog.tags=@test feature_files E:\migration\auto-go\src\features>go version E:\migration\auto-go\src\features>godog --version |
Did you try with "--godog.format=junit"? Then capture the XML output with bash. What is described in this issue if for the future implementation I guess |
@mdelapenya I see code is merged for this change. So assumed its available. I had tried with redirecting o/p to xml file. testing: warning: no tests to run |
This would also be useful with the cucumber formatter. Right now, it´s just printing the cucumber.json to stdout. Even if I try to redirect the output to a file, it doesn't contain only the json but all the other output from go test, application logs, etc, making it unusable. |
Hi 👋 is there an ETA for this? |
@mdelapenya people are working on this in their spare time so I don't think that's an appropriate question. |
@aslakhellesoy sorry if you considered it as an un-appropriate question, that was not my intention of course. I know what working in open source means and I try to be polite any time I talk to maintainers. So at no reason I was trying to cause offence and I apologize if that was the case. I'm looking forward to using this new feature, because I have to deal with ugly hacks to parse the XML output. |
Hey @dipaligulhane @mdelapenya @brpaz We have a few remaining issues for v0.11.0 before it can be released. |
I will close this issue and have created another issue to add support for executing multiple formatters in the same test run. |
Hey @dipaligulhane @mdelapenya @brpaz Sorry for the long delay, v0.11.0 is now released with support for writing the output to a file. BR |
I'll give it a try ASAP Thanks again for your work here 👏👏👏 |
Nice, let me know if you have any issues! :) |
@lonnblad surely will try with latest build. |
Hey @lonnblad, using this version for a few days, and it works fairly well. KUDOS! One thing that surprised me, if setting a path as filename (i.e. Again, thanks for your work here! |
@mdelapenya |
I'd say it's ok as it is now. In my case the build system/automation is the one responsible of creating the required paths. |
BTW, is it possible to use multiple formatters? 🤔 My use case would be writing the jUnit file plus a format that would enable creating an HTML report for the test scenarios. |
currently it's not supported, but I want to add support for multiple formatters, #346 |
@lonnblad started using and its working as expected. I am currently using junit XML formatter. |
@dipaligulhane nice, thanks for the feedback!! :) |
What do you think about adding output options for writing the output to a file?
Something like this:
It would allow a user to see the progress status of the execution, but also write a junit formatted file.
The text was updated successfully, but these errors were encountered: