You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Shing Hing Man <ma...@yahoo.com> on 2006/08/20 16:22:05 UTC

Why is maven2 running all the unit tests twice ?

In a maven 2 subproject, when I do 'mvn test', all the
unit tests in my submodule are run twice.
As there are hundreds of unit tests, I only want all
the unit tests to be run once.
It would be appreciated if someone could provide some
assistance.

Shing

Here is part of the pom.xl of my subproject :



<build>
    <plugins>
          <plugin>
               
<groupId>org.apache.maven.plugins</groupId>
                       
<artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                       
<testFailureIgnore>true</testFailureIgnore>
                           <excludes>
                             <exclude>
                             
com/anite/morris/opsr/service/v4/impl/TPRNearly*.java
                            </exclude>
                        </excludes>
                                </configuration>
                        </plugin>
                 </plugins>
</build>


The ouput from the console (just before the first unit
test being run the first time):


[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered
resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/matmsh/download/anite/temp/18Aug/workspace/morris/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running
com.anite.morris.opsr.validator.v3.impl.PPFEstablishedDateValidatorTest


***********************************

The ouput from the console (just before the first unit
test being run the seond time ):


Results :
Tests run: 321, Failures: 0, Errors: 18, Skipped: 0

[ERROR] There are test failures.
[INFO] [surefire:test {execution: default}]
[INFO] Surefire report directory:
/home/matmsh/download/anite/temp/18Aug/workspace/morris/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.anite.morris.opsr.validator.v3.impl.PPFEstablishedDateValidatorTest

Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

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


Re: Why is maven2 running all the unit tests twice ?

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Shing Hing Man wrote:
> In a maven 2 subproject, when I do 'mvn test', all the
> unit tests in my submodule are run twice.
> As there are hundreds of unit tests, I only want all
> the unit tests to be run once.
> It would be appreciated if someone could provide some
> assistance.
>   
Old bugs - related to
http://jira.codehaus.org/browse/MSUREFIREREP-6

and possible corbertura as well.

Please vote! :-)

-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com



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