You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2010/04/22 15:24:12 UTC

[jira] Commented: (SUREFIRE-613) Wrong number of JUnit4 tests when running in parallel

    [ http://jira.codehaus.org/browse/SUREFIRE-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=218602#action_218602 ] 

Kristian Rosenvold commented on SUREFIRE-613:
---------------------------------------------

The parallel junit provider requires legal junit-tests (as opposed to the classic junit4-provider). Make sure all your test methods are annotated with @Test or they will not be run.

> Wrong number of JUnit4 tests when running in parallel
> -----------------------------------------------------
>
>                 Key: SUREFIRE-613
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-613
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.5
>         Environment: Cygwin
> Maven 2.0.9
> Maven Surefire plugin 2.5
> JUnit 4.8.1
>            Reporter: Mag Hoehme
>
> I have a test class with three test methods, out of which two fail. When running sequentially, I get the following output, which is correct in my opinion:
> ===
> Tests run: 3, Failures: 2, Errors 0, Skipped 0, ....
> Results:
> Failed tests:
>    a(...)
>    b(...)
> Tests run: 3, Failures: 2, Errors: 0, Skipped: 0
> ===
> Then I switch to parallel execution:
> === pom.xml ===
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-surefire-plugin</artifactId>
>    <version>2.5.</version>
>    <configuration>
>       <parallel>classes</parallel>
>    </configuration>
> </plugin>
> ===============
> This gives me the following output from the same test class:
> ===
> Tests run: 2, Failures: 2, Errors, 0, Skipped: 0 ...
> Results :
> Failed tests:
>    a(...)
>    b(...)
> Tests run: 2, Failures: 2, Errors: 0, Skipped: 0
> ===
> The same problem occurs with "<parallel>methods</parallel>" and "<parallel>tests</parallel>". When running a bunch of tests, the reported number of tests is lower than the actual number of tests.
> Am I missing something, or is this a bug?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira