作为一名前 Java 开发人员,他习惯于每次执行构建时都使用 Jenkins 来启动 JUnit 测试,我希望让我的 Specs 以类似的方式运行。
在命令行中运行sbt test
时,我设置的测试用例运行良好。下面是测试运行的输出:
[info] MySqlStoreSpec
[info]
[info] MySqlStore Spec should
[info] + getUserIdFromEmail
[info] + getUserUserProperties
[info] + getUserHashFromEmail
[info] + md5
[info] + getUserContextFromStripeId
[info]
[info]
[info] Total for specification MySqlStoreSpec
[info] Finished in 24 ms
[info] 5 examples, 0 failure, 0 error
当我在 Jenkins 中运行构建时,我收到以下消息:
[info] No tests to run for test:test
我怀疑不启动测试的问题与我sbt
在 Jenkins 中的设置有关。在构建的配置中,我使用 sbt 启动器0.12.4
和操作test
。有没有人有让 specs2 在 Jenkins 上运行的经验?