-
Notifications
You must be signed in to change notification settings - Fork 226
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
system-out
is never placed under the correct testcase
#175
Comments
And as a side note (not sure if I should open a separate issue), when the test panics, all the logs is placed under error.message, like:
|
I have similar issue: Reproduce:
func TestPanic(t *testing.T) {
// cause a panic in order to get the test to exit with an exception
panic("This test has a panic")
}
go test -count=1 -v -timeout 1h | tee test_output.log
go-junit-report < test_output.log > report.xml will produce <?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="6" errors="1" failures="5">
<testsuite name="github.com/company/test" tests="6" failures="5" errors="1" id="0" hostname="foo" time="0.066" timestamp="2024-03-26T18:09:14Z">
<testcase name="TestPanicTerraform" classname="github.com/company/test" time="0.000">
<failure message="Failed"></failure>
</testcase>
<system-out><![CDATA[panic: This test has a panic [recovered]
panic: This test has a panic
goroutine 13 [running]:
testing.tRunner.func1.2({0x1877a80, 0x201da60})
/home/linuxbrew/.linuxbrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
/home/linuxbrew/.linuxbrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1548 +0x397
panic({0x1877a80?, 0x201da60?})
/home/linuxbrew/.linuxbrew/Cellar/go/1.21.5/libexec/src/runtime/panic.go:914 +0x21f
github.com/company/test.TestPanicTerraform(0xc000581380?)
/mnt/c/dev/GitHub/terratest-action/test/terraform_hello_world_test.go:117 +0x25
testing.tRunner(0xc000642680, 0x1c7e1b8)
/home/linuxbrew/.linuxbrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
/home/linuxbrew/.linuxbrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1648 +0x3ad
exit status 2]]></system-out>
</testsuite>
</testsuites> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to leverage this tool to send my go ci reports and logs to Datadog.
Sadly, it seems that no matter what options I try, the system-out is always put at the
testsuite
level, for instance:Is it something not supported?
The text was updated successfully, but these errors were encountered: