Thank you Kristian,
my mistake. I was trying to use parallel with an old project which
uses JUnit3 tests via JUnit4, so no @Test annotations.

Now, I am trying again with another project which is using JUnit4
with tests annotated with @Test.

But I do not see any speed-up improvement (on a Quad Core).

Also, I see:

[INFO] Concurrency config is {threadCount=4, parallel=both, configurableParallelComputerPresent=false}

What the "configurableParallelComputerPresent=false" means?

I am not even sure if threadCount=4 means 4 threads per core
or 4 threads in total.

But, at least, this time the number of tests executed is correct.

Thanks again,
Paolo

Kristian Rosenvold wrote:
Please note that the parallel provider actually requires correctly defined junit4/junit3 tests to run, annotate your methods with @Test.

The "classic" Junit 4 provider would run a large number of tests that were incorrectly defined according to junit specifications. The concurrent provider uses the same selection mechanism as the junit 4 provider, but junit itself adds an additional compliance check before running the test.

I also recommend you use the latest release of Junit; 4.8.2, or 4.8.1 if 4.8.2 hasn't reached the repos yet.

Kristian
Den 11.04.2010 23:58, skrev Paolo Castagna:
Hi,
I am trying to see if running JUnit tests in parallel makes any
difference and/or significant speed-up.

I have this in my pom.xml:

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>

[...]

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

When I run the tests without <parallel> and <threadCount> I see:

Tests run: 9491, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: ...

While when I run the tests with <parallel> and <threadCount> as showed
above:

Tests run: 40, Failures: 0, Errors: 0, Skipped: 0

Is this a bug?

Am I doing something wrong here?

Thanks,
Paolo



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to