[ 
https://issues.apache.org/jira/browse/SUREFIRE-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140999#comment-15140999
 ] 

Dmitry Baev commented on SUREFIRE-1225:
---------------------------------------

I know that JUnit need to have an unique Description for each test case and 
already read the docs as well. My point is that I don't like to care about 
JUnit internal test case descriptions at all. I kinda have a test cases in my 
source code and I like to run the test cases by method name (at least while 
test case is a method in my source code). 

Why am I think so:

In my case I build a distributed test runner, so I need to get the list of test 
cases to run and then create a tasks to execute. Each task can contains one or 
few test cases to run. The problem is that I don't is it a JUnit parameterized 
test or it is TestNg test or whatever. In general I like to simply provide to 
Surefire a command like "could you please run the test methods for me". And I 
expect that surefire will decide how to run this methods by yourself. I don't 
have a JUnit context, so I can't get the real test cases descriptions. An 
example, some users can use an JUNit extension that will change the policy of 
naming test cases in Descriptions. 



> Can't run a single parameterized test
> -------------------------------------
>
>                 Key: SUREFIRE-1225
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1225
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.19.1
>            Reporter: Dmitry Baev
>
> The sample test to reproduce the problem:
> {code:java|title=com/github/baev/MyTest.java}
> @RunWith(Parameterized.class)
> public class MyTest {
>     @Parameterized.Parameters
>     public static Collection<Object[]> data() {
>         return Arrays.asList(
>                 new Object[]{},
>                 new Object[]{}
>         );
>     }
>     @Test
>     public void testWithParameters() throws Exception {
>     }
> }
> {code}
> and then run 
> {{clean test -Dtest=com.github.baev.MyTest#testWithParameters}}
> The output is
> {{Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on 
> project surefire-base-test-bug: No tests were executed!}}
> Is it expected?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to