You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Honza Brázdil (JIRA)" <ji...@codehaus.org> on 2012/07/24 17:30:21 UTC

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Honza Brázdil created SUREFIRE-889:
--------------------------------------

             Summary: JUnit | supprot inheritance of test's categories/groups
                 Key: SUREFIRE-889
                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
             Project: Maven Surefire
          Issue Type: Improvement
            Reporter: Honza Brázdil
         Attachments: surefire-hierarchical-categories.patch

We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.

Right now are tests @Category compared to surefire's group by class name.

e.g.:
If we have category hierarchy:
{code:java}
interface NiceTests extends AllTests;
interface NicePurpleTests extends NiceTests;
{code}

and tests:
{code:java}
@Category(NiceTests.class) public void ReallyNiceTest();
@Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
{code}

and surefire groups set to:
{code:xml}<groups>com.example.NiceTests</groups>{code}

it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.


I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier reassigned SUREFIRE-889:
----------------------------------

    Assignee: Paul Gier
    
> JUnit | supprot inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>            Assignee: Paul Gier
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories-doc.patch, surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier closed SUREFIRE-889.
------------------------------

    Resolution: Fixed

Applied patches in [r1366767|http://svn.apache.org/viewvc?view=revision&revision=1366767].
                
> JUnit | supprot inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>            Assignee: Paul Gier
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories-doc.patch, surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | support inheritance of test's categories/groups

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated SUREFIRE-889:
-----------------------------------

    Summary: JUnit | support inheritance of test's categories/groups  (was: JUnit | supprot inheritance of test's categories/groups)
    
> JUnit | support inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>            Assignee: Paul Gier
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories-doc.patch, surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Posted by "Honza Brázdil (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Honza Brázdil updated SUREFIRE-889:
-----------------------------------

    Attachment: surefire-hierarchical-categories-doc.patch

I've added documentation patch for junit.apt.vm. I don't now much about TestNG and if it is affected by this JIRA. 
                
> JUnit | supprot inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories-doc.patch, surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304554#comment-304554 ] 

Paul Gier commented on SUREFIRE-889:
------------------------------------

Thanks for the patch!  Can you add a usage example to the site docs?  There are some relevant pages located under src/site/apt/examples/ which describe the "groups" parameter in the pages junit.apt.vm and testng.apt.vm.  The apt format is documented here: http://maven.apache.org/doxia/references/apt-format.html


                
> JUnit | supprot inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (SUREFIRE-889) JUnit | supprot inheritance of test's categories/groups

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated SUREFIRE-889:
-------------------------------

      Component/s: Maven Surefire Plugin
    Fix Version/s: 2.12.1
    
> JUnit | supprot inheritance of test's categories/groups
> -------------------------------------------------------
>
>                 Key: SUREFIRE-889
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-889
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>            Reporter: Honza Brázdil
>             Fix For: 2.12.1
>
>         Attachments: surefire-hierarchical-categories.patch
>
>
> We have multiple tests in multiple groups and we want to use tests group hierarchy using interface inheritance so we can specify if we wants to run e.g. all NiceTests or more specific NicePurpleTests.
> Right now are tests @Category compared to surefire's group by class name.
> e.g.:
> If we have category hierarchy:
> {code:java}
> interface NiceTests extends AllTests;
> interface NicePurpleTests extends NiceTests;
> {code}
> and tests:
> {code:java}
> @Category(NiceTests.class) public void ReallyNiceTest();
> @Category(NicePurpleTests.class) public void NicePurpleTestWithDots();
> {code}
> and surefire groups set to:
> {code:xml}<groups>com.example.NiceTests</groups>{code}
> it runs only {{ReallyNiceTest}}, but not {{NicePurpleTestWithDots}} as wanted.
> I've attached patch which fixed it for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira