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

Hi Laxmi

i guess you should go with Testng.xml as you can define your test cases there, there order,there groups  although i have no idea about  TestNG>Convert to TestNG  but i guess using testng.xml to control your test cases is better

and you can define testng.xml in your pom this way



		


Vice Professor Answered on April 22, 2015.

ankit can u please explain code u added for “you can define testng.xml in your pom this way”
I don’t know how to do this

on April 24, 2015.
Add Comment

Your Answer

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