How to coverage test golang http/grpc services?

Written by
Link to Post

https://www.reddit.com/r/golang/comments/bykqg3/how_to_coverage_test_golang_httpgrpc_services/ by 

Hello.

I have written test cases (both positive and negative) to test my http and grpc service handlers.

But the problem is, when I try to get the coverage, it’s always 0.00%

Why is that?

By the way, my tests are always in “tests” sub package. Not in the same http/grpc package. Is that a problem? Then what is the solution?

Can anyone show me a basic example of golang http/grpc testing with coverage?

Thanks

submitted by /u/CrappyFap69
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply