-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add support for console output #90
Conversation
@SimenB any idea why jest 22 fails in this PR? It's related to babel-jest. I removed it from travis checks since I usually check against the last two versions of jest. But if there is a legit problem let me know. Didn't seem related to this PR. |
Haven't dug into it, but do you install the same version of both babel-jest and jest? |
It should. It has a pretest script that installs the version of jest we're testing against.
|
Yeah, but |
I don't explicitly install babel-jest. Just jest. |
Ayyy that fixed it. Thanks @SimenB |
Was just looking to do exactly this! Nice. Looking forward to this change. |
@palmerj3 any idea when this will be available? |
@TonyG623 I'll try to merge this today and push a minor release. The PR was open for feedback and I haven't gotten any :) I'm not super familiar with the needs that folks have when showing console data in junit files. I've wrapped the data in a CDATA block and the data I show is a jest data structure that shows the source file and the console output itself. Have a look and let me know if you think that would work for your use-case. |
@palmerj3 my goal is to get console logs to show in jenkins results. We have less than ideal Selenium tests that log some output as the test runs that help debugging when something fails. Currently all that logging is lost. If its in the XML report it displays there. Here is how it looks now with your example.. its not pretty , but it currently shows... Which is way better than we currently have. |
@TonyG623 would that work for your use-case? |
@palmerj3 I believe it will work for us. |
Hi, thanks for your work on this. What is blocking that PR on being merged? If something has to be done, i can give some time to help solving issues. |
@jkblume thanks! If you're able to test this branch on your CI environment and see if the output is useful that would be great. I can get this merged today. |
I would also love this, any idea when it would be ready for use? |
Just published 6.4.0 - give it a shot and file an issue if there are any problems. |
Adds a new boolean option "JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT" | "includeConsoleOutput" which is false by default. If set to true, and your test suite(s) generate some stdout/console output it will look similar to this in the generated junit.xml:
This PR also improves the documentation in README so it's more clear how to configure jest-junit as a reporter.