Go: how to run tests for multiple packages?

后端 未结 4 1901
别那么骄傲
别那么骄傲 2020-12-31 07:33

I have multiple packages under a subdirectory under src/, running the tests for each package with go test is working fine.

When trying to run all tests

4条回答
  •  孤城傲影
    2020-12-31 08:17

    Please try out the following github repository.

    https://github.com/appleboy/golang-testing

    Copy coverage.sh to /usr/local/bin/coverage and change permission.

    $ curl -fsSL https://raw.githubusercontent.com/appleboy/golang-testing/master/coverage.sh /usr/local/bin/coverage
    $ chmod +x /usr/local/bin/coverage
    

提交回复
热议问题