How to run a single scala test with extension?

I know that I sbt clean coverage testwill generate a coverage report using all the test cases of the project, even a warm JVM needs age to reach the goal.

I want to run a test review for the code that I wrote this way, I tried to run one test test, for example sbt coverage test-only package.ScalaSpec, and I get the following error.

ERROR

[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.

+4
source share
1 answer

Indicate the full package name in quotation marks.

doesn't work because it parses the command, as if the target testis the first argument to cover, and the qualified package name package.ScalaSpecis the second.

Instead, you must specify only one argument: sbt coverage "test-only package.ScalaSpec"

test, 2- .
test-only package.ScalaSpec.

+2

Source: https://habr.com/ru/post/1679507/


All Articles