Ejecución de varias series de pruebas con TestNG

Is it possible to create and run multiple test suites with TestNG? I am wanting to associate a suite with a build. That way I can have the same basic structure for each suite, but the build number and tests change. Here's one suite I have now...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="Build#" parallel="tests" thread-count="5"> 
   <test name="Firefox Tests" preserve-order="true">
    <parameter name="Browser" value="Firefox"/>
    <classes>
       <class name="testsuites.WelcomePageTests"/> 
       <class name="testsuites.AgencySelectPageTests"/>
    </classes>
  </test>
  <test name="Chrome Tests" preserve-order="true">
    <parameter name="Browser" value="Chrome"/>
    <classes>
       <class name="testsuites.WelcomePageTests"/> 
       <class name="testsuites.AgencySelectPageTests"/>
    </classes>
  </test>
  <test name="IE Tests" preserve-order="true">
    <parameter name="Browser" value="IE"/>
    <classes>
       <class name="testsuites.WelcomePageTests"/> 
       <class name="testsuites.AgencySelectPageTests"/>
    </classes>
  </test>
  <test name="Opera Tests" preserve-order="true">
    <parameter name="Browser" value="Opera"/>
    <classes>
       <class name="testsuites.WelcomePageTests"/> 
       <class name="testsuites.AgencySelectPageTests"/>
    </classes>
  </test>
</suite>

preguntado el 08 de noviembre de 11 a las 16:11

1 Respuestas

Sure, you can create as many testng.xml as you want.

You can also create them in memory with the programmatic API, which might be more convenient if the content of your suites tends to change.

respondido 08 nov., 11:22

How can I run both testng.xml files at the same time? - Reid Mac

I ended up doing it programatically, and it works great, plus I have more control of the tests. I can now have multiple suites and each suite corresponds to a specific build. Easy regression testing ahoy!@Cedric Beust lol - Reid Mac

Glad to hear it, let me know if you have more questions! - Cedric Beust

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.