I know how to run all the tests in a single class using Gradle.
gradle -Dtest.single=FooTest test
But if FooTest contains a particular test method of special interest and I want to run only that method, how would I do that if using JUnit? And TestNG? I know with maven you can do something like this in the case of JUnit:
mvn -Dtest='FooClass#testMethod1' test
For JUnit I tried
$ gradle test -Dtest.single='FooClass#testMethod1'
but that did not work. Nor does (I’m grasping)
$ gradle test -Dtest.single='FooClass.testMethod1'
Is there a way to do that?