Gradle command syntax for executing TESTNG tests as a group
问题 I have some tests as below: @Test(groups={"smoke"}) public void Test1(){...} @Test(groups={"smoke", "regression"}) public void Test2(){...} @Test(groups={"regression"}) public void Test3(){...} In build.gradle file I have below: task smoketests(type: Test){ useTestNG() { suites "src/test/resources/testng.xml" includeGroups "smoke" } } I need to have a gradle syntax to run the smoke/regression tests only using commandline. I have tried this: ./gradlew clean test -P testGroups="smoke" if I run