Closed walid-halabi-myob closed 7 years ago
@walid-halabi-myob it should be doable as describe here: https://stackoverflow.com/questions/31344419/gradle-run-only-one-test-suite/31370966#31370966
Wow that was fast, thanks for the answer.
I tried this with both gradle 2.8 (what we were using) and gradle 3.3, and both give me:
Unknown command-line option '--tests'.
Not sure when this command line option was available? I'm thinking it comes in via a plugin, but not sure which?
For anyone coming later, this works: ./gradlew testDebug --tests com.package.ClassOfSpec
Note the use of the variant testDebug. just using the test task fails with the Unknown command-line option error
Also, using the -Dtest.single system property method has been superseded by the test filtering approach (--tests) as above.
So I've tried ./gradlew -Dtest.single=SomeSpec and it runs all the tests.
I've also tried ./gradlew -DtestSomeVarient=SomeSpec, as well as ./gradlew -Dtest.com.some.package.SomeSpec (and the various combinations of these 2 approaches) and still no 🎲
Any ideas? I have a feeling I got this working about a year ago but there's no docs that help.