The suite is working fine when I right click the main_suite.xml and run as a TestNG test suite. But when the xml suite is run using the run method in TestNG, it is throwing the below error.
Exception in thread "main" org.testng.TestNGException:
Two suites cannot have the same name: Suite_Add_New
at org.testng.TestNG.checkSuiteNamesInternal(TestNG.java:1019)
at org.testng.TestNG.checkSuiteNamesInternal(TestNG.java:1022)
at org.testng.TestNG.checkSuiteNames(TestNG.java:1012)
at org.testng.TestNG.sanityCheck(TestNG.java:985)
at org.testng.TestNG.run(TestNG.java:1037)
I have confirmed that there are no duplicate suite names in the child files though TestNG is throwing an exception at checkSuiteNamesInternal(List<XmlSuite> suites, Set<String> names) method. Any help is appreciated.
Thanks
Hemant