質問

Currently we are using IntelliJ, Scala, SBT to kick off our tests in our local enviroment. With SBT command line, we can specify specific test, suites, wildcards, as instructed here:

ScalaTest.org Page

Such as "test-only *RedSuite"

However on our CI Jenkins server, with the SBT pluging, when specifying this, it gives an error.

In the action field, the following values were used:

Action:compile test-only test.package.name

Using the following does work for ALL tests:

Action:compile test

[success] Total time: 240 s, completed Apr 28, 2014 12:29:36 PM
[error] Expected ID character
[error] Not a valid command: org (similar: export)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Not a valid key: org (similar: fork, run, doc)
[error] org.company.scalatest.abc.regressionsuite
[error]    ^
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
Recording test results

Does anyone know if there is a way we can pass these parameters through the jenkins SBT plugin?

役に立ちましたか?

解決

This is a quoting problem, your Action field is parsed as 3 commands:

  • compile
  • test-only
  • org.company.scalatest.abc.regressionsuite

And it chokes because that org is not a valid command.

Using compile "test-only org.company.scalatest.abc.regressionsuite" should fix that.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top