How to create a TestNG Suite

Answered

I trying to figure out how to create a testng .xml file to run 4 of my java test files. I can run them individually and they run fine and pass testing. Now I'd like to put them all into one testNG .xml file but I'm not sure how to create that file and more importantly, where in my folder structure it should be created?

 

Thanks for any help.

 

0
6 comments

See https://www.mkyong.com/unittest/testng-tutorial-5-suite-test.

Suite file can be anywhere in the project. You specify its location here:

0
Avatar
Permanently deleted user

I created the .xml file and updated its location as you show above and I can see the .xml file in my IDE but when I right click on it I don't see any run as test ng menu selection?

 

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="TestAll">

<test name="order">
<classes>
<class name="audit.Audit01" />
<class name="audit.Audit02" />
</classes>
</test>

</suite>
0

Add run configuration manually for TestNG as shown on my screenshot.

0
Avatar
Permanently deleted user

I don't see a "run configuration manually" in your screen shot above?

 

0
Avatar
Permanently deleted user

OK got it working...thanks much for the help.

 

0

Please sign in to leave a comment.