Skip to content
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

Summary report #9

Closed
joaopapereira opened this issue Mar 11, 2019 · 4 comments
Closed

Summary report #9

joaopapereira opened this issue Mar 11, 2019 · 4 comments

Comments

@joaopapereira
Copy link

It would help if in the end of the tests we got a summary of the tests that failed.

This feature would help when the system under tests have a big number of packages and tests, because the errors could be in the beginning of the output and there is no visual information that a test failed.

@sclevine
Copy link
Owner

The worst aspect of this UX (not noticing that any tests failed) should be covered by this: golang/go#30507

Locally, I often run with go test instead of go test -v so that I only see test failures. I also direct stdout/stderr from my code to it.Out() which only appears on test failure (using the included reporters). But I understand that this doesn't cover the CI use case, where you want to see all the tests and a summary.

I don't think this feature would be a good fit for spec, given that it just organizes subtests and doesn't operate across packages. However, this could be implemented as a CLI tool that parses go test -json (introduced in Go 1.10). In fact, it has, and that CLI is available on a number of CI platforms (like CircleCI). 😄

I've actually considered deprecating the reporter interface entirely, but I think it's nice to have an option that works without installing an additional CLI.

@marco-m
Copy link

marco-m commented Jun 1, 2019

FYI, golang/go#30507 has been closed with a commit to master a few days ago.

@kardolus
Copy link

kardolus commented Nov 25, 2019

@joaopapereira I have been piping the output of spec tests to tee >(richgo testfilter) - richgo gives you colors and all. --> https://github.com/kyoh86/richgo

@sclevine
Copy link
Owner

Closing given the available options.

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

No branches or pull requests

4 participants