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?
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
You need to use test.single
system property. Have a look at this article.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.