I have multiple classes under tests using junit and gradle. When I run "gradle test", all my classes are tested. How can I run just one test file?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can run a single test file from the cli like this:
gradle test --tests org.gradle.SomeTest
You can also run just a particular test method in a similar way:
gradle test --tests org.gradle.SomeTest.someSpecificFeature
回答2:
You need to use test.single
system property. Have a look at this article.