I have a gradle task that executes a testng test suite. I want to be able to pass a flag to the task in order to use a special testng xml suite file (or just use the default
This worked for me:
test { if (properties.containsKey('special')) { test(testng_special.xml); } else { test(testng_default.xml); } }