[英]sbt aggregate coverage reports for unit and integration tests
I use the sbt
plugin scoverage to generate test coverage reports for my scala project. 我使用
sbt
插件scoverage为我的scala项目生成测试覆盖率报告。 However, I'm unable to combine the test reports for unit tests and integration tests. 但是,我无法将测试报告与单元测试和集成测试结合起来。
Here are the commands I run 这是我运行的命令
sbt coverage test // to run unit tests
sbt coverage it:test // to run integration tests
sbt coverageReport // to generate coverage report
In the case above, I only get the coverage report for integration tests. 在上面的例子中,我只获得了集成测试的覆盖率报告。
Question 题
Thanks in advance. 提前致谢。
The issue was that I was running sbt clean
after running the unit tests and before running the integration tests. 问题是我在运行单元测试之后和运行集成测试之前运行
sbt clean
。
So, the commands as listed above, should generate the combined coverage report. 因此,上面列出的命令应生成组合覆盖率报告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.