Is it possible to post coverage for multiple packages to Coveralls?

前端 未结 6 640
故里飘歌
故里飘歌 2021-02-04 10:02

I want to track test coverage on a go project using Coveralls, the instructions for the integration reference using https://github.com/mattn/goveralls

cd $GOPA         


        
6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-04 10:39

    In Go 1.13, following command generates coverage for multiple packages

    go test -v -coverpkg=./... -coverprofile=profile.cov ./...
    go tool cover -func profile.cov
    

    for html report

    go tool cover -html=profile.cov -o cover.html
    

提交回复
热议问题