You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Lacton (JIRA)" <ji...@apache.org> on 2008/06/26 18:55:45 UTC

[jira] Created: (BUILDR-89) JUnit TestTask runs even abstract test classes

JUnit TestTask runs even abstract test classes
----------------------------------------------

                 Key: BUILDR-89
                 URL: https://issues.apache.org/jira/browse/BUILDR-89
             Project: Buildr
          Issue Type: Bug
          Components: Test frameworks
    Affects Versions: 1.3.1
            Reporter: Lacton


The JUnit TestTask tries to instantiate and run all classes that extend junit.framework.TestCase, even when the class is abstract.

I get the following error output.

    [junit] Testsuite: AbstractTestCase
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,014 sec
    [junit]
    [junit] Testcase: warning took 0,006 sec
    [junit]     FAILED
    [junit] No tests found in AbstractTestCase
    [junit] junit.framework.AssertionFailedError: No tests found in AbstractTestCase
    [junit]
    [junit] TEST AbstractTestCase FAILED


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (BUILDR-89) JUnit TestTask runs even abstract test classes

Posted by "lacton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

lacton closed BUILDR-89.
------------------------


> JUnit TestTask runs even abstract test classes
> ----------------------------------------------
>
>                 Key: BUILDR-89
>                 URL: https://issues.apache.org/jira/browse/BUILDR-89
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.1
>            Reporter: lacton
>             Fix For: 1.3.2
>
>
> The JUnit TestTask tries to instantiate and run all classes that extend junit.framework.TestCase, even when the class is abstract.
> I get the following error output.
>     [junit] Testsuite: AbstractTestCase
>     [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,014 sec
>     [junit]
>     [junit] Testcase: warning took 0,006 sec
>     [junit]     FAILED
>     [junit] No tests found in AbstractTestCase
>     [junit] junit.framework.AssertionFailedError: No tests found in AbstractTestCase
>     [junit]
>     [junit] TEST AbstractTestCase FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-89) JUnit TestTask runs even abstract test classes

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Assaf Arkin resolved BUILDR-89.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.2

> JUnit TestTask runs even abstract test classes
> ----------------------------------------------
>
>                 Key: BUILDR-89
>                 URL: https://issues.apache.org/jira/browse/BUILDR-89
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.1
>            Reporter: Lacton
>             Fix For: 1.3.2
>
>
> The JUnit TestTask tries to instantiate and run all classes that extend junit.framework.TestCase, even when the class is abstract.
> I get the following error output.
>     [junit] Testsuite: AbstractTestCase
>     [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,014 sec
>     [junit]
>     [junit] Testcase: warning took 0,006 sec
>     [junit]     FAILED
>     [junit] No tests found in AbstractTestCase
>     [junit] junit.framework.AssertionFailedError: No tests found in AbstractTestCase
>     [junit]
>     [junit] TEST AbstractTestCase FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-89) JUnit TestTask runs even abstract test classes

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608887#action_12608887 ] 

Alexis Midon commented on BUILDR-89:
------------------------------------

The issue is more about (abstract or concrete) classes extending TestCase but having no test methods.


> JUnit TestTask runs even abstract test classes
> ----------------------------------------------
>
>                 Key: BUILDR-89
>                 URL: https://issues.apache.org/jira/browse/BUILDR-89
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.1
>            Reporter: Lacton
>
> The JUnit TestTask tries to instantiate and run all classes that extend junit.framework.TestCase, even when the class is abstract.
> I get the following error output.
>     [junit] Testsuite: AbstractTestCase
>     [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,014 sec
>     [junit]
>     [junit] Testcase: warning took 0,006 sec
>     [junit]     FAILED
>     [junit] No tests found in AbstractTestCase
>     [junit] junit.framework.AssertionFailedError: No tests found in AbstractTestCase
>     [junit]
>     [junit] TEST AbstractTestCase FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-89) JUnit TestTask runs even abstract test classes

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608925#action_12608925 ] 

Assaf Arkin commented on BUILDR-89:
-----------------------------------

I added a fix to exclude abstract classes.

If you're using JUnit annotations and you don't annotate the class or any of its methods, it won't be picked up.  If you're extending TestCase and not including any tests, you'll either want to exclude it directly (test.exclude) or contribute a more elaborate implementation of JavaTestFilter.

> JUnit TestTask runs even abstract test classes
> ----------------------------------------------
>
>                 Key: BUILDR-89
>                 URL: https://issues.apache.org/jira/browse/BUILDR-89
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.1
>            Reporter: Lacton
>             Fix For: 1.3.2
>
>
> The JUnit TestTask tries to instantiate and run all classes that extend junit.framework.TestCase, even when the class is abstract.
> I get the following error output.
>     [junit] Testsuite: AbstractTestCase
>     [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,014 sec
>     [junit]
>     [junit] Testcase: warning took 0,006 sec
>     [junit]     FAILED
>     [junit] No tests found in AbstractTestCase
>     [junit] junit.framework.AssertionFailedError: No tests found in AbstractTestCase
>     [junit]
>     [junit] TEST AbstractTestCase FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.