Closed tgrosinger closed 9 years ago
@tgrosinger - Sounds like you're interested in the -coverpkg
flag. It's something I've wanted as well. One purpose of the "profile" branch I've been working on is to enable custom coverage flags. It's possible that we'll be able to support this but I'm not exactly sure at the moment. I'll have to experiment with that...
For now, any custom coverage flags have to be invoked from the command line. :(
Yea, I think @mdwhatcott is describing what I am looking for. Is it possible to use these flags when launching Convey or do I just have to run it completely separately right now?
Thanks
@tgrosinger - For now, it's completely separate. Basically, for any custom test flags, you have to open a separate command line and run the commands manually.
Okay, well looking forward to the possibility of this being added. Thanks!
This is still an open feature request, so I don't think this issue should have been closed.
This is actually already supported and resolved--sorry, should have commented here when the profile feature was completed. See the assertions package profile for a working example.
cd $GOPATH/src/github.com/smartystreets/goconvey/convey/assertions
goconvey
Then open the browser to http://localhost:8080
and click on the coverage bar for the assertions package. The files dropdown will show all files in both the assertions
package and the oglematchers
package because they are both listed as values to the -coverpkg
flag.
Enjoy!
Is there a way to cause the coverage report calculate coverage of the whole project rather than by package?
For example, if I have unit tests on package A but A depends on and uses B, there is a good chance that part of package B is covered as well even if I have not explicitly written tests for it.
I believe this can be done using the cover tool, just not sure how it can be done in Convey.