1

我正在尝试示例应用程序计算机数据库,然后运行“播放测试”。没有测试正在运行。我正在使用播放 2.1.3。

https://github.com/playframework/playframework/tree/2.1.x/samples/java/computer-database/test

$ play

 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/

play! 2.1.3 (using Java 1.7.0_25 and Scala 2.10.0), http://www.playframework.org



$ play test
[info] FunctionalTest
[info] 
[info] 
[info] Total for test FunctionalTest
[info] Finished in 0.009 seconds
[info] 0 tests, 0 failures, 0 errors
[info] ModelTest
[info] 
[info] 
[info] Total for test ModelTest
[info] Finished in 0.001 seconds
[info] 0 tests, 0 failures, 0 errors
[info] IntegrationTest
[info] 
[info] 
[info] Total for test IntegrationTest
[info] Finished in 0.0 seconds
[info] 0 tests, 0 failures, 0 errors
4

1 回答 1

1

这是 2.1.3 中的错误。这是解决方法。http://play.lighthouseapp.com/projects/82401/tickets/967-tests-are-not-discovered

将此添加到您的依赖项中:

"play" %% "play-test" % play.core.PlayVersion.current % "test" exclude("com.novocode", "junit-interface"),
"com.novocode" % "junit-interface" % "0.9" % "test"
于 2013-08-17T01:17:54.880 回答