angelokh
angelokh

Reputation: 9428

Java tests not running for sample app?

I am trying the example app computer-database and then run 'play test'. No tests are running. I am using play 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

Upvotes: 1

Views: 161

Answers (1)

angelokh
angelokh

Reputation: 9428

This is a bug in 2.1.3. Here is the workaround. http://play.lighthouseapp.com/projects/82401/tickets/967-tests-are-not-discovered

add this to your dependencies:

"play" %% "play-test" % play.core.PlayVersion.current % "test" exclude("com.novocode", "junit-interface"),
"com.novocode" % "junit-interface" % "0.9" % "test"

Upvotes: 1

Related Questions