很明显,人们希望将单个测试作为参数传递给“test-only”,以便按照文档所说运行一个测试。
但是如何做到这一点呢?在Java中,您可能有一个类UserTest,它扩展了WithApplication并定义了对用户模型进行一堆测试(每个使用@Test)。
您想要这样说:
test-only models.UserTest.createAUser
但仅限测试才能告诉您
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for test:testOnly
[success] Total time: 0 s
那么如何只运行一个测试?