Maven/TestNG/Selenium – Can I set up multiple tests suites in one testng.xml and run different ones at different times?

I am using Maven/TestNG/Selenium.  I have about 50 tests in one suite and one file  right now what I want to do is separate tests into several suites:
Acceptance  – Will have the five tests to accept the build
Full Pass   – The other forty-five tests
Debug       – The one testing I am currently coding and debugging
I want to be able to run a particular suite as needed.  Can I do this from one testng.xml file or do I need multiple files?
I think my testng.xml file will look something like:
I am using Maven/TestNG/Selenium.  I have about 50 tests in one suite and one file  right now what I want to do is separate tests into several suites:
Acceptance  - Will have the five tests to accept the build
Full Pass   - The other forty-five tests
Debug       - The one testing I am currently coding and debugging
I want to be able to run a particular suite as needed.  Can I do this from one testng.xml file or do I need multiple files?
I think my testng.xml file will look something like:
<suite name="ACCEPT">
  <test name="blah">   </test>
 <test name="foo">   </test>
</suite>
<suite name="FULLPASS">
  <test name="T1">    </test>
 <test name="T2">    </test>
 <test name="T3">    </test>
</suite>

Add Comment
  • 0 Answer(s)
  • Your Answer

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