Java – gradle: how to exclude some tests?
•
Java
My Src / test / folder includes unit and function tests The classpath of functional test is cucumber, while unit test does not So how do I run unit tests?
thank you very much.
P.S .: I know it's easy to use "include" logic to select tests For example, in order to run functional tests in my case, I can simply use this/ gradlew test -Dtest. Single = cucumber / * * / however, I don't know how to exclude tests in a simple way
BTW, I'm using graduation 1.11
Solution
The documentation task explains it with an example and everything:
apply plugin: 'java' // adds 'test' task test { // ... // explicitly include or exclude tests include 'org/foo/**' exclude 'org/boo/**' // ... }
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码