-
Notifications
You must be signed in to change notification settings - Fork 124
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
Include test output for successful tests in junitfile #118
Comments
Thank you for your interest in It is possible that a new flag could be added to preserve all of the output, including that of passed tests. Are you looking for only the failure output, or output for passed tests as well? |
Looking for all output .. |
https://github.com/gotestyourself/gotestsum/blob/master/testjson/execution.go#L275-L276 is the line, but I think there may still be other parts of the code that assume this output is removed. If I remember correctly https://github.com/gotestyourself/gotestsum/blob/6cbcac1/internal/junitxml/report.go#L173-L176 will also need to be changed to include the output in the report. There is no field for that right now on the struct. Do you know what the xml tag name should be? |
I don't but I'll try to look into it soon ... |
@arthurvaverko you could use the Adding a flag to preserve the output for all test could be nice, but we really prefer the current behavior. |
I opened a Pr for this #327 |
#380 was opened recently and sounds like the same ask. I think maybe we should close one of these issues as a duplicate. The discussion in that issue made me realize it's not clear where It sounds like #327 and others in these issues are expecting it as a child tag ex: <testcase>
<system-out></system-out>
</testcase> If I look at all the top hits on google (https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd, https://github.com/testmoapp/junitxml, https://stackoverflow.com/a/9410271/444646) they put Does anyone have an example of the schema that puts Edit: Ah https://github.com/testmoapp/junitxml does actually show it as both. So I guess that's where it comes from. |
Ah, <testcase name="TestIsAliveSuite" classname="internal/foo" time="0.000">
<system-out><![CDATA[ suite.go:229: warning: no tests to run]]></system-out>
</testcase> |
I am using #327 for a while now and it works fine with Jenkins, so the location of system-out that I used in the PR seems fine. |
My tests print out logs using
t.Log(..)
is there any way to display these logs inside a junit output ?
The text was updated successfully, but these errors were encountered: