How do you specify a single test to be run by play framework's "test-only"command

Viewed 7802

It's pretty clear that one would like to pass a single test as an argument to test-only, so that you can do what it's documentation says: run one test.

But how do you do this? In java, you probably have a class UserTest that extends WithApplication and defines a bunch of tests on the User model (using @Test for each).

You would like to say

test-only models.UserTest.createAUser

but test-only will tell you

[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for test:testOnly
[success] Total time: 0 s

So how do you run only one test?

2 Answers
Related