[testng-dev] TestRunner throws TestNG exception indicating duplicate suite names when there are no duplicates present

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[testng-dev] TestRunner throws TestNG exception indicating duplicate suite names when there are no duplicates present

Hemant Sushant
When invoking the test runner programmatically using the one master xml and multiple suite files, it is throwing a TestNG exception stating 'two suites cannot have the same name'.
But there are no duplicate file names in the linked suite file.

Attached the project with main-suite.xml as the master xml.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.

BugReport.zip (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[testng-dev] Re: TestRunner throws TestNG exception indicating duplicate suite names when there are no duplicates present

Hemant Sushant
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
 

On Thursday, October 17, 2013 11:40:19 AM UTC+5:30, Hemant Sushant wrote:
When invoking the test runner programmatically using the one master xml and multiple suite files, it is throwing a TestNG exception stating 'two suites cannot have the same name'.
But there are no duplicate file names in the linked suite file.

Attached the project with main-suite.xml as the master xml.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.