Can somebody elaborate on this?

1) This says TestNG allows you to... but it is a configuration for sure fire?
2) It also says "including JUnit tests" So I'm a bit confused..

I'd just like to know how to get my junit tests to run in parallel.


TestNG allows you to run your tests in parallel, including JUnit tests. To do 
this, you must set the parallel parameter, and may change the threadCount 
parameter if the default of 5 is not sufficient. For example:

    [...]
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <parallel>methods</parallel>
          <threadCount>10</threadCount>
        </configuration>
      </plugin>
    [...]

This is particularly useful for slow tests that can have high concurrency, or 
to quickly and roughly assess the independance and thread safety of your tests 
and code.

Reply via email to