Hi,

We've been using TeamCity to build and test a project. The project builds
and all tests are run, but TeamCity displays an incorrect number of tests in
the output. This is the end of the console output from TeamCity:

Failed tests: 
[12:02:11]: [bt6] 
[12:02:11]: [bt6] Tests run: 740, Failures: 5, Errors: 0, Skipped: 0
[12:02:11]: [bt6] 
[12:02:11]: [bt6] [INFO]
------------------------------------------------------------------------
[12:02:11]: [bt6] [ERROR] BUILD FAILURE
[12:02:11]: [bt6] [INFO]
------------------------------------------------------------------------
[12:02:11]: [bt6] [INFO] There are test failures.
[12:02:11]: [bt6] 
[12:02:11]: [bt6] Please refer to
/usr/local/TeamCity/buildAgent/work/b5b991b90c73d0c9/target/surefire-reports
for the individual test results.
[12:02:11]: [bt6] [INFO]
------------------------------------------------------------------------
[12:02:11]: [bt6] [INFO] For more information, run Maven with the -e switch
[12:02:11]: [bt6] [INFO]
------------------------------------------------------------------------
[12:02:11]: [bt6] [INFO] Total time: 11 minutes 
[12:02:11]: [bt6] [INFO] Finished at: Tue Jan 08 12:02:11 CET 2008
[12:02:11]: [bt6] [INFO] Final Memory: 13M/94M
[12:02:11]: [bt6] [INFO]
------------------------------------------------------------------------
[12:02:11]: [bt6] Process exit code: 1
[12:02:11]: [bt6] Number of processed tests: 485
[12:02:11]: [bt6] Publishing artifacts
[12:02:11]: [Publishing artifacts] Will process paths: [teamcity-info.xml]
[12:02:11]: [bt6] Publishing artifacts 'teamcity-info.xml' to root artifacts
directory
[12:02:12]: [bt6] Artifacts path teamcity-info.xml not found
[12:02:12]: [bt6] Build finished


As you can see above, 740 tests are (with 5 failures), however TeamCity only
finds 485 tests run.

We have seperated our tests into 9 testsuites, and all surefire xml reports
are generated on the build machine, so the tests are run with correct number
of failures.

We've looked at a comment on the TeamCity site regarding Maven 2.0.4 and
Surefire 2.2:  http://www.jetbrains.net/confluence/display/TCD3/Maven2
http://www.jetbrains.net/confluence/display/TCD3/Maven2  

We're using the following:

Maven 2.0.4
Surefire 2.4 (taken from maven surefire staging repo;
http://people.apache.org/~dfabulich/staging-repo)
TeamCity 3.0.1

The pom.xml file surefire snippet:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4</version>
        <configuration>
           <forkMode>always</forkMode>
           <argLine>-Xmx768m -XX:MaxPermSize=384m 
-Dtest.use.mysql=true</argLine>
           <printSummary>true</printSummary>
           <includes>                                                   
                <include>**/*TestSuite.java</include>
           </includes>
           <excludes>
                <exclude>**/NormalTestSuite.java</exclude>
                <exclude>**/test/utils/*TestSuite.java</exclude>
          </excludes>
      </configuration>
   </plugin>


We see there's a fix for the above mentioned problem with maven 2.0.4 and
surefire 2.2 here:  http://jira.codehaus.org/browse/SUREFIRE-122
http://jira.codehaus.org/browse/SUREFIRE-122 

Could it be a regression problem?

Your response is kindly appreciated.
-- 
View this message in context: 
http://www.nabble.com/Number-of-reported-tests-is-incorrect-%28regression-%29-tp14688448s177p14688448.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to