RE: What is difference between adding a xml file to project named- TestNg.xml & Project>TestNG>Convert to TestNG?

Hi Guys,

I have come across 2 methods of converting project into TestNG:
1. Create a new Maven project (with simple archtypes)
2. Then write your methods & use @Test while doing so.
3. Then add a XML file named TestNG.xml
Ref: http://www.toolsqa.com/selenium-webdriver/testng-testsuite/
 or
1. Create a new Maven project (with simple archtypes)
2. Then write your methods & use @Test while doing so.
3. Right click on project
TestNG>Convert to TestNG

Kindly advise which option is better?

Also, please put a light on How to call TestNGSuite from POM.xml

Many thanks

Add Comment
3 Answers

These are new features provided by eclipse
we can convert a java project to maven
we can convert junit classes/methods in maven project to testng framework
we can create directly a maven project using eclipse and add we can dependency in POM and recompile using eclipse it actually runs command
mvn clean install

You can use eighter option both are same, it does nothing but it create a testng.xml file for you based on ur project

Supporter Answered on April 24, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.