[
https://jira.codehaus.org/browse/SUREFIRE-745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=354423#comment-354423
]
Jianfeng Sun edited comment on SUREFIRE-745 at 10/15/14 4:16 PM:
-----------------------------------------------------------------
@ Tibor Digana
Today, I tried this with JUnit and I saw same issue. I manually specifying a
provider
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.17</version>
</dependency>
1) mvn -Dit.test=class1#method1,class2#method2 verify
get 0 test case error
2) mvn -Dit.test=class1,class2#method2 verify
get a) only method 2 executed
b) class1 + method1 from class2 and method2 from class2 3 test
executed
3) mvn -Dit.test=class1#method1,class2#* verify
get 0 test case error
Is this an issue or I made any mistake here?
+and I need to mention that I'm using failsafe 2.17 not surefire even if I
don't think that will be an issue.
was (Author: wind19862006):
@ Tibor Digana
Today, I tried this with JUnit and I saw same issue. I manually specifying a
provider
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.17</version>
</dependency>
1) mvn -Dit.test=class1#method1,class2#method2 verify
get 0 test case error
2) mvn -Dit.test=class1,class2#method2 verify
get a) only method 2 executed
b) class1 + method1 from class2 and method2 from class2 3 test
executed
3) mvn -Dit.test=class1#method1,class2#* verify
get 0 test case error
Is this a issue or I made any mistake here?
> -Dtest supports multiple test classes but not multiple test methods
> -------------------------------------------------------------------
>
> Key: SUREFIRE-745
> URL: https://jira.codehaus.org/browse/SUREFIRE-745
> Project: Maven Surefire
> Issue Type: Improvement
> Environment: Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
> Java version: 1.6.0_24, vendor: Apple Inc.
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_CA, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
> Reporter: reid holmes
> Assignee: Olivier Lamy
> Priority: Minor
> Fix For: 2.12.1
>
> Attachments: multipleMethods.patch, multipleMethods-v2.patch,
> multipleMethods-v3.patch, multipleMethods-v4.patch, SUREFIRE-745.patch,
> SUREFIRE-745-v2.patch
>
>
> The -Dtest parameter is very handy for running a specific test class or test
> method. It also supports running multiple test classes. Unfortunately, it
> does not permit specifying running multiple test methods. It would be great
> if this were possible.
> The examples below are from the Apache Commons project.
> WORKS: Run multiple test classes:
> mvn test -Dtest=ImmutablePairTest,StopWatchTest
> WORKS: Run a specific test method:
> mvn test -Dtest=ImmutablePairTest#testBasic
> DOES NOT WORK:
> mvn test
> -Dtest=StopWatchTest#testStopWatchSimple,StopWatchTest#testStopWatchSimpleGet
> mvn test -Dtest=ImmutablePairTest#testBasic,StopWatchTest#testLang315
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)