我正在使用最新的 Go GAE SDK开发服务器。每次更改后我都在运行测试:
goapp test -test.v=true
我-cover用来记录覆盖率,如下所述goapp help testflag:
goapp test -cover -test.v=true -test.coverprofile=c.out
[..]
coverage: 53.8% of statements
ok _/var/lib/jenkins/jobs/loyalty/workspace 30.464s
这将成功完成并打印测试覆盖的行的百分比。但是,尝试将结果可视化失败:
goapp tool cover -html=c.out
cover: can't find "app.go": cannot find package "_/home/ingo/git/loyalty/" in any of:
/home/ingo/Downloads/go_appengine_sdk_linux_amd64-1.9.10/go_appengine/goroot/src/pkg/_/home/ingo/git/loyalty (from $GOROOT)
/home/ingo/git/loyalty/src/_/home/ingo/git/loyalty (from $GOPATH)
Go 的封面工具仅适用于非 GAE 应用程序吗?我是否必须以不同的方式打包我的应用程序才能可视化覆盖结果?
梵蒂冈之花
相关分类