You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-users@maven.apache.org by Igor Petruk <Ig...@epam.com> on 2011/04/22 11:42:02 UTC

Surefire random number of tests

Here is my SureFire config

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.8.1</version>
                        <dependencies>
                          <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>2.8.1</version>
                          </dependency>
                        </dependencies>

                    <configuration>
                        <parallel>none</parallel>
                        <forkMode>once</forkMode>
                        <threadCount>4</threadCount>
                        <excludes>
                            <exclude>**/manual/**</exclude>
                        </excludes>
                        <argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine>
                    </configuration>
                </plugin>

When I run my test set I get different number of tests executed. When the "parallel"="none" I get about the half, but different each time. If I enable parallel test execution then the number of tests is smaller.

What could be an issue? How does forkMode relates to this issue?

Spring 3.0.5, JUnit 4.8.2

RE: Surefire random number of tests

Posted by Igor Petruk <Ig...@epam.com>.
Why Spring guys do not want to merge your changes?

RE: Surefire random number of tests

Posted by Igor Petruk <Ig...@epam.com>.
Bamboo counts tests. I have seen this article before, but I though it is not an issue now. Thanks.

Re: Surefire random number of tests

Posted by Kristian Rosenvold <kr...@gmail.com>.
You will need to patch spring-test as described here:
http://incodewetrustinc.blogspot.com/2010/01/run-your-junit-tests-concurrently-with.html

If you run repeated 'clean install', how do you see the difference ?
(Who is counting what?)

Kristian

Den 22. apr. 2011 kl. 11:42 skrev Igor Petruk <Ig...@epam.com>:

> Here is my SureFire config
>
>                <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-surefire-plugin</artifactId>
>                    <version>2.8.1</version>
>                        <dependencies>
>                          <dependency>
>                            <groupId>org.apache.maven.surefire</groupId>
>                            <artifactId>surefire-junit47</artifactId>
>                            <version>2.8.1</version>
>                          </dependency>
>                        </dependencies>
>
>                    <configuration>
>                        <parallel>none</parallel>
>                        <forkMode>once</forkMode>
>                        <threadCount>4</threadCount>
>                        <excludes>
>                            <exclude>**/manual/**</exclude>
>                        </excludes>
>                        <argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine>
>                    </configuration>
>                </plugin>
>
> When I run my test set I get different number of tests executed. When the "parallel"="none" I get about the half, but different each time. If I enable parallel test execution then the number of tests is smaller.
>
> What could be an issue? How does forkMode relates to this issue?
>
> Spring 3.0.5, JUnit 4.8.2