running tests in parallel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

running tests in parallel

Douglas Ferguson-2
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 | Threaded
Open this post in threaded view
|

Re: running tests in parallel

Douglas Ferguson-2
Also,

I just found this on somebodies blog, but I can't find anything on this configuration settings...

          <plugin>
              <artifactid>maven-surefire-plugin</artifactid>
              <version>2.5-SNAPSHOT</version>
              <configuration>
                  <parallel>classes</parallel>
                  <useUnlimitedThreads>true</useUnlimitedThreads>
                  <threadCount>80</threadCount>
                  <perCoreThreadCount>true</perCoreThreadCount>
              </configuration>
          </plugin>


On Jan 28, 2010, at 2:20 AM, Douglas Ferguson wrote:

> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: running tests in parallel

Wayne Fay
> I just found this on somebodies blog, but I can't find anything on this configuration settings...

All of this is documented in the plugin website:
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: running tests in parallel

Sree09
Hi,
i too am struggling with the maven-surefire-plugin configuration for running
the tests in parallel. I have tried all possible ways mentioned here but
parallel execution using maven is still not possible. Please assist me with
this as my company wants to implement parallel execution on a priority
basis.



--
View this message in context: http://maven.40175.n5.nabble.com/running-tests-in-parallel-tp109512p5862384.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: running tests in parallel

Wayne Fay
Maven users on this list generally have a better experience when they
don't just ask "how is this supposed to work" but instead demonstrate
that they have actually tried to solve their problem by themselves.
Ideally you'd provide one or more examples of the Maven configuration
you have tried along with a statement related to each saying what
worked and what did not.

This list will not simply do your homework/job for you. There is a lot
of documentation on the site. Start there. Also search the Maven Users
archives.

Wayne

On Mon, Feb 15, 2016 at 11:04 PM, Sree09 <[hidden email]> wrote:

> Hi,
> i too am struggling with the maven-surefire-plugin configuration for running
> the tests in parallel. I have tried all possible ways mentioned here but
> parallel execution using maven is still not possible. Please assist me with
> this as my company wants to implement parallel execution on a priority
> basis.
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/running-tests-in-parallel-tp109512p5862384.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]