Having a very basic issue with running tests in a Java Play 2.0 app. It won’t pick up my tests.
I’ve tried to put a test folder in the root of the project and use Junit as the docs seem to suggest. This results in:
$ play test
[info] Loading project definition from /Users/.../play20TestTest/project
[info] Set current project to play20TestTest (in build file:/Users/.../testapps/play20TestTest/)
[info] No tests to run for test:test
[success] Total time: 1 s, completed May 22, 2012 11:16:52 AM
I’ve also tried putting test under app. This at least picks up my code, but the test packages aren’t available on my classpath so I assume it’s incorrect.
I made a simple example and copied SimpleTest from the docs exactly: https://github.com/jsimone/Play2UnitTest
You placed your test in
test/test/SimpleTest.java, move it totest/SimpleTest.javaand it will work withplay testcommand.