Test-infra: junit test output for failed go tests does not include actual failure

Created on 21 Dec 2018  路  5Comments  路  Source: kubernetes/test-infra

What happened:
An integration test failed, and I tried to see the failure in the captured test output. The actual failure was very clear in the test log, and was missing from the junit output and gubernator summary

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Please provide links to example occurrences, if any:

Example test failure:
https://gubernator.k8s.io/build/kubernetes-jenkins/pr-logs/pull/70862/pull-kubernetes-integration/39056/

junit results: https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/70862/pull-kubernetes-integration/39056/artifacts/junit_23d8221f6dd39944b901fc32c32ba55c006dc238_20181221-130539.xml

raw log (warning, big file): https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/70862/pull-kubernetes-integration/39056/artifacts/junit_23d8221f6dd39944b901fc32c32ba55c006dc238_20181221-130539.stdout

The actual failure is very clear in the raw log:

--- FAIL: TestNewDeployment (3.54s)
    deployment_test.go:52: failed to create deployment : 0-length response

But that does not appear in the junit or gubernator output. The junit output appears to capture all the stdout/stderr from the test run just up to the --- FAIL line and then stop, when that is actually the beginning of the part we care the most about.

Is it possible to always capture the content starting at --- FAIL, put that front and center in the junit/gubernator output, and optionally include stdout/stderr up to some threshold? That would also improve searching of test failures in the triage board, which currently doesn't see failure patterns when the actual failures don't make it into the junit summary text.

Anything else we need to know?:


/kind bug

kinbug

Most helpful comment

All 5 comments

@liggitt you can recreate this using:

  • go get -u github.com/jstemmer/go-junit-report
  • cat junit_23d8221f6dd39944b901fc32c32ba55c006dc238_20181221-130539.stdout | go-junit-report > report.xml

you will see the report.xml is the same as junit_23d8221f6dd39944b901fc32c32ba55c006dc238_20181221-130539.xml and is missing the failed to create deployment : 0-length response message. So we have to go fix that utility

Closing as this is an issue in jstemmer/go-junit-report

/close

@stevekuznetsov: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiangpengzhao picture xiangpengzhao  路  3Comments

stevekuznetsov picture stevekuznetsov  路  4Comments

MrHohn picture MrHohn  路  4Comments

lavalamp picture lavalamp  路  3Comments

cblecker picture cblecker  路  4Comments