How may I run testing suite XML files in parallel?

I have two TestNG test suite XML files, each suite has two classes, and I want to run both suites in parallel.

I don't want to run methods or classes in parallel; I want to run the suites in parallel using TestNG, because each suite has its own config parameters.

Answers


          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
                <suiteXmlFiles>
                    <file>Suite1.xml</file>
                    <file>Suite2.xml</file>
                </suiteXmlFiles>
                <properties>
                    <property>
                        <name>suitethreadpoolsize</name>
                        <value>2</value>
                    </property>
                </properties>
            </configuration>
        </plugin>

I'd recommend a Suite-of-Suites configuration. Please see my answer here.

From your surefire plugin, you'd simply need to invoke your master suite file instead of each one individually.


Instead of executing suites files in parallel, create two test suites in one xml and set parallel="tests".

And specify your parameters inside <test> </test> tags, below is an example.

<suite name="Demo Suite" parallel="tests">        
        <test name="TestSuite1">
            <parameter name="driver.name" value="firefoxDriver" />
            <classes>
                <class name="com.example.Demo1" />
            </classes>
        </test>
        <test name="TestSuite2">
            <parameter name="driver.name" value="chromeDriver" />
            <classes>
                <class name="com.example.Demo2" />
            </classes>
        </test>
</suite>

Need Your Help

Static svg file not rendering from spark-java

embedded-jetty spark-java

I am new to web programming, and have run into a problem with the serving of a static svg file from spark-java 2.5 that does not seem to be present if I use python SimpleHTTP webserver instead.

Double Conversion to decimal value IEEE-754 in Python

python double decimal ieee-754

I am trying to convert my double type data 64 bits long to decimal value. I am following https://en.wikipedia.org/wiki/Double-precision_floating-point_format