Is it possible to run multiple testng xml suites in gradle by using TestNG options in build.gradle file

Hi,

If I want to run more then 1 testng xml files using the options for useTestNG(), how can i achieve it.
Ex: - If I am having 3 or 4 suites that I want to run one after the another .

I have a code that can run just one xml file at a time. But i need to run a set of testng xml files one after the another.
Ex: java org.testing.TestNG TestSuite.xml,TestSuite1.xml,TestSuite2.xml

Existing code: -
useTestNG()
{
options.suites(new File(projRoot+"/src/test/resources/testngSuites/testFile1.xml"))
}

How to use options.suiteXmlFiles to provide multiple testNG xml files.?

Thanks in advance

1 Like

test {
useTestNG() {
useDefaultListeners = true
suites (‘src/test/java/FirstSuite.xml’,‘src/test/java/SecondSuite.xml’)
}
scanForTestClasses = false
}