Code coverage is grayed out

I'm trying to run unit tests with coverage but the Run menu option "Run 'go test myproject' with Coverage" is grayed out. I'm using version GoLand 2018.1.2 (GO-181.4668.90)

0
3 comments
Official comment

This is caused by the Go 1.9 not being able to generate a coverage report for recursive configurations, which is what is used when using this method to run tests. Please upgrade to the latest Go release, 1.10.2, and this will be solved. Thank you.

Hi, can you please send a screenshot of the Run Configuration? Also, which Go version are you using?

0
Avatar
Permanently deleted user

 

I am using Go 1.9. After playing around more, I noticed that if I right-click on the _test.go file there is a menu entry for running that file with Coverage. Is it somehow due to the directory 'mypackage' in my example?

 

0

Please sign in to leave a comment.