我知道sbt clean coverage test将使用项目中的所有测试用例生成覆盖率报告,即使使用温暖的JVM也需要很长时间才能完成.
我希望对我编写的代码的测试运行覆盖,所以我尝试运行单个测试用例sbt coverage test-only package.ScalaSpec,我得到以下错误.
错误
[scala-project] $ coverage test-only package.ScalaSpec
<set>:1: error: eof expected but 'package' found.
coverageEnabled in ThisBuild := true test-only package.ScalaSpec
^
[error] Error parsing expression.