Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在 scala 中开发的批处理作业。我正在使用 shell 脚本触发作业,并希望测量作业的代码覆盖率。该作业在构建创建后触发。
这份工作后如何开始覆盖?
您可以在 shell 脚本中添加以下命令来执行测试和测量覆盖率:
sbt clean coverage test coverageReport
您可以添加以下命令来检查是否coverage高于最小值build.sbt:
coverage
build.sbt
coverageMinimum := 80 coverageFailOnMinimum := true