Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Support printing a summary #37

Open
ansel1 opened this issue Sep 16, 2016 · 3 comments
Open

Support printing a summary #37

ansel1 opened this issue Sep 16, 2016 · 3 comments

Comments

@ansel1
Copy link

ansel1 commented Sep 16, 2016

We use go2xunit on our teamcity server. We do something like:

go test -v | tee test.out
go2xunit -input test.out -output test.xml -fail

Works great, except that we have lots of tests, and with the -v flag, go test's output is very verbose. If a test fails, you need to open up the output or the xml file and search for the failure cases. Would be nice if go2xunit supported a flag to print out a summary of the failed test cases to stdout, something like out test runners in other languages print out a summary of results (n tests run, n succeeded, n failed, etc, the format varies by language and test framework).

@tebeka
Copy link
Owner

tebeka commented Sep 17, 2016

Interesting idea. Some comments about it:

  1. Since you use tee all the original output is in test.out which you can grep for FAIL
  2. Since go2xunit prints to stdout by default (so it can be piped to other programs) it means the summary will make the output XML invalid
  3. We might print the report to stderr, but stderr is usually save to errors and some programs fail when there's some data in stderr

I'll think on how to make this happen. But IMO the best approach will be to add a step and grep FAIL test.out

@ansel1
Copy link
Author

ansel1 commented Sep 23, 2016

  1. Yup, true. Might try that.
    2 & 3. I was thinking it would only be a valid flag is used with -output

@tebeka
Copy link
Owner

tebeka commented Sep 24, 2016

I rather keep go2xunit simple. Closing this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants