Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

display failed test output #45

Closed
cryptix opened this issue Jul 26, 2014 · 15 comments
Closed

display failed test output #45

cryptix opened this issue Jul 26, 2014 · 15 comments
Assignees
Milestone

Comments

@cryptix
Copy link

cryptix commented Jul 26, 2014

Hi,

i'm not sure if this is intentional or a bug but when running go test fails there is no output of any kind only the abscensce of the coverage hints at something beeing wrong.

Would be nice to have a pane display the output. Extra awesomeness would be to parse that output to jump to where it failed.

@joefitzgerald
Copy link
Owner

That would be a nice enhancement. You're right that currently we ignore the test output from go test -coverprofile (except the coverage information). Given we're already running the tests, it'd be nice to get:

  • Test errors if they occurred, with links to the line that caused the failure
  • Indication of the number of passing / failing tests in the package
  • Indication of the coverage %

Does that sound right? Anything else?

@cryptix
Copy link
Author

cryptix commented Jul 26, 2014

That would be more than enough for me. 👍

@joefitzgerald
Copy link
Owner

By the way, per your reddit question, watch this PR - when it's done, I have cleared the path for gocode to be added to go-plus.

atom/autocomplete-plus#99

Thanks for the great feedback! This is exactly what I need!

@cryptix
Copy link
Author

cryptix commented Jul 26, 2014

Yeah, I already saw it and subscribed. Can't wait! :D

@joefitzgerald joefitzgerald added this to the 3.0 milestone Nov 4, 2014
@joefitzgerald joefitzgerald modified the milestones: 3.0, 3.1 Nov 16, 2014
@joefitzgerald joefitzgerald self-assigned this Nov 22, 2014
@joefitzgerald joefitzgerald modified the milestones: 3.1, 4.1 Dec 17, 2014
@freewil
Copy link

freewil commented Feb 25, 2015

It would be nice to see the output of go test [-v] to see failing tests, but I could do without the background color changes from the code coverage results.

@svanharmelen
Copy link
Contributor

+1 this would be a much appreciated and helpful feature!

@Erwyn
Copy link

Erwyn commented Jun 15, 2015

Same here would love to see failing tests…

@gregz67
Copy link

gregz67 commented Jun 17, 2015

What are people using to get go test [-v] output while in atom. I'd like to see test output on save.

@nickpoorman
Copy link

+1

@xogeny
Copy link

xogeny commented Jul 14, 2015

I've come up with a solution that I'm pretty happy with. I use goconvey for testing. I run this in a terminal window somewhere and it runs indefinitely. But the interesting thing about goconvey is that it spawns a web server that gives a nice report about testing, coverage, etc. Then what I do is open http://localhost:8080 using the browser-plus extension. Each time I save my code, goconvey automatically re-runs the tests and I see the results immediately in the right hand pane.

Now, my tests are instrumented with goconvey assertions. Not sure how this would work with ordinary go test tests, but it might work.

By default goconvey uses a nice dark theme that is actually very close to Atom's defaults. So with the split pane view, it actually looks like it was intentionally integrated:

screen shot 2015-07-14 at 11 26 16 am

@gregz67
Copy link

gregz67 commented Aug 5, 2015

Thanks @xogeny. I will have to look at goconvey. I ended up simply using run-command for running a simple go test command.

@bwiggs
Copy link

bwiggs commented Nov 2, 2015

Would love this feature! Any updates?

@joprice
Copy link

joprice commented Jan 27, 2016

I'm using reflex

reflex -r '\.go$' ./test

Where 'test' is this script:

out=/tmp/c.out
go test -covermode=count -coverprofile=$out ./lists
go tool cover -func=$out
go tool cover -html=$out -o /tmp/coverage.html

Not too sophisticated, but it lets me run tests and coverage by itself, independent of atom, see the output in the console, and view coverage data in the browser (Since this plugin also doesn't show coverage inline when any test fails), without buying into a new and coverage style like Convey.

@joefitzgerald
Copy link
Owner

Kinda like this?:

screen shot 2016-08-24 at 12 25 08 am
screen shot 2016-08-24 at 12 24 52 am

@joefitzgerald
Copy link
Owner

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

No branches or pull requests

10 participants