You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2009/10/10 23:00:49 UTC

[jira] Created: (SUREFIRE-577) running only one method of a unit class (with -Dtest=MyClass.myMethod)

running only one method of a unit class (with -Dtest=MyClass.myMethod)
----------------------------------------------------------------------

                 Key: SUREFIRE-577
                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
             Project: Maven Surefire
          Issue Type: New Feature
            Reporter: Olivier Lamy


I definitely don't know if it's possible with junit.
But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249759#action_249759 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

ok I see your point. No problem for only one parameter !
I have a strong hesitation : -Dtest=Foo#mytest -DFoo.mytest .
Will be probably the most long : find the correct syntax (or we can support both :-) ).

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249753#action_249753 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

My goal is more to be able to execute only one test !
{code}
-Dtest=FooBar -DtestMethod=testNiceStuff.
{code}
In this case only FooBar#testNiceStuff will be executed.

BTW if -Dtest= is null and not -DtestMethod, we can execute method(s) from scanned classes which match the parameter value.
WDYT ?

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Updated: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-577:
----------------------------------------

    Component/s: Maven Surefire Plugin

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Updated: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SUREFIRE-577:
----------------------------------

    Summary: running only some method of a unit class (with -Dtest.method=myMethod)  (was: running only one method of a unit class (with -Dtest=MyClass.myMethod))

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>            Reporter: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257470#action_257470 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

some stuff started here : https://github.com/olamy/maven-surefire


> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Issue Comment Edited: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257470#action_257470 ] 

Olivier Lamy edited comment on SUREFIRE-577 at 2/23/11 12:19 PM:
-----------------------------------------------------------------

some stuff started here : https://github.com/olamy/maven-surefire

works with junit 4.x 



      was (Author: olamy):
    some stuff started here : https://github.com/olamy/maven-surefire

  
> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Updated: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SUREFIRE-577:
----------------------------------

    Summary: running only some method of a unit class (with -Dtest=MyClass#myMethod)  (was: running only some method of a unit class (with -Dtest.method=myMethod))

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257662#action_257662 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

implementation for testng done.
How to test this feature have a look here : http://olamy.blogspot.com/2011/02/maven-surefire-executing-only-one-test.html 

@Kristian : let me know if you have time to review before I merge this in ASF repo.

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only one method of a unit class (with -Dtest=MyClass.myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249327#action_249327 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

I rathter prefer something like :
{code}
-Dtest.method=*nicetest*
{code}

> running only one method of a unit class (with -Dtest=MyClass.myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>            Reporter: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=259687#action_259687 ] 

Jesse Glick commented on SUREFIRE-577:
--------------------------------------

Seems to be working well in 2.8 from the staging repo. I have prepared a patch for NetBeans to use this to enable the action Run Focused Test from the editor context menu for a project using Surefire 2.8+. (It already worked if you bypass Maven for running individual tests, which is the default behavior; but there is the option to use Maven + Surefire even for single test suites - useful for people with unusual build setups - which will now work also with single test cases.) I will plan to incorporate in NB 7.1. Thanks!

By the way I am the integrator (not original author) of the corresponding feature in Ant 1.8.2.

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>             Fix For: 2.8
>
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Closed: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed SUREFIRE-577.
---------------------------------

    Resolution: Fixed

merged in [rev 1074633|http://svn.apache.org/viewvc?view=revision&revision=1074633]

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>             Fix For: 2.7.3
>
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Issue Comment Edited: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249748#action_249748 ] 

Kristian Rosenvold edited comment on SUREFIRE-577 at 12/27/10 1:13 PM:
-----------------------------------------------------------------------

I think we should just use the single -Dtest=FooBar flag for all options.

FooBar can be a test class, a test method (likely fooBar) or a JUnit Category. Since we scan the classpath and all classes we can just create the union if any disambiguity.  Note that JUnit categories is the same as testNg groups, and we already have a parameter on the surefire mojo for TestNG groups. I Just think it's natural to be able to specify groups/categories using the same -Dtest parameter

      was (Author: krosenvold):
    I think we should just use the single -Dtest=FooBar flag for all options.

FooBar can be a test class, a test method (likely fooBar) or a JUnit Category. Since we scan the classpath and all classes we can just create the union if any disambiguity. 
  
> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252525#action_252525 ] 

SebbASF commented on SUREFIRE-577:
----------------------------------

Ant supports this from version 1.8.2 [1].

They use a new attribute:

methods 	Comma-separated list of names of test case methods to execute.

A similar implementation here would be easier for those who need to use both Ant and Maven.

[1] http://ant.apache.org/manual/Tasks/junit.html#nested


> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Updated: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SUREFIRE-577:
----------------------------------

    Fix Version/s: 2.7.3

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>             Fix For: 2.7.3
>
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Updated: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-577:
----------------------------------------

    Fix Version/s:     (was: 2.7.3)
                   2.8

> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>             Fix For: 2.8
>
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249749#action_249749 ] 

Kristian Rosenvold commented on SUREFIRE-577:
---------------------------------------------

For junit you just use the Request.method method and the corresponding method on JunitCore that accepts a request on the 4.7 provider. I'm sure the same feature is available for 4.0.

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249757#action_249757 ] 

Kristian Rosenvold commented on SUREFIRE-577:
---------------------------------------------

I understand you want to run one specific test ;) I'm thinking we have all the information we need here, and can be more like google, you type something after -Dtest and we use that to resolve your request. If you're imprecise or lazy we might run a few more tests. If you're concise or have well named tests you get your single test.

I'm not particularly worried about syntax here ; -Dtest=MyClass#myTest, -Dtest=MyClass.myTest, -Dtest=myTest, -Dtest=*.myTest or whatever. I just think we should keep the api simple from the user perspective.

I'm interested in solving SUREFIRE-656 for 2.8, but regardless of that I think a unified -Dtest= syntax would be cool, and really user friendly. 

> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Commented: (SUREFIRE-577) running only some method of a unit class (with -Dtest=MyClass#myMethod)

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255731#action_255731 ] 

Olivier Lamy commented on SUREFIRE-577:
---------------------------------------

I'm +1
for -Dtest=Foo#mytest (with support of * -Dtest=Foo#my*test ).


> running only some method of a unit class (with -Dtest=MyClass#myMethod)
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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

        

[jira] Issue Comment Edited: (SUREFIRE-577) running only some method of a unit class (with -Dtest.method=myMethod)

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249748#action_249748 ] 

Kristian Rosenvold edited comment on SUREFIRE-577 at 12/27/10 1:16 PM:
-----------------------------------------------------------------------

I think we should just use the single -Dtest=FooBar flag for all options.

FooBar can be a test class, a test method (likely fooBar) or a JUnit Category. Since we scan the classpath and all classes we can just create the union if any ambiguity.  Note that JUnit categories is the same as testNg groups, and we already have a parameter on the surefire mojo for TestNG groups. I Just think it's natural to be able to specify groups/categories using the same -Dtest parameter.

Also note that interpreting these parameters is all the way down at the provider level; I am unsure if all the providers will provide the same level of features wrt this.

      was (Author: krosenvold):
    I think we should just use the single -Dtest=FooBar flag for all options.

FooBar can be a test class, a test method (likely fooBar) or a JUnit Category. Since we scan the classpath and all classes we can just create the union if any disambiguity.  Note that JUnit categories is the same as testNg groups, and we already have a parameter on the surefire mojo for TestNG groups. I Just think it's natural to be able to specify groups/categories using the same -Dtest parameter
  
> running only some method of a unit class (with -Dtest.method=myMethod)
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-577
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-577
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>
> I definitely don't know if it's possible with junit.
> But it's an idea, I have now :-).

-- 
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