You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/07/05 10:00:26 UTC

DO NOT REPLY [Bug 35605] New: - Incorrect summary output during junit tests: Running

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35605>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35605

           Summary: Incorrect summary output during junit tests: Running
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: skitching@apache.org


When running the <junit> task, the message "Running ${testname}" gets printed
for some odd reason. It only occurs for one of the test cases in a set, and can
be extremely confusing under certain circumstances.

Attached is a simple example of 3 test cases (Test1, Test2, Test3) being run.
The output of "ant" is:
<output>
Buildfile: build.xml

compile:
    [javac] Compiling 3 source files

test:
    [junit] Running Test3
    [junit] Test1.test1 ok
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.04 sec
    [junit] Test2.test1 bad
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.038 sec
    [junit] TEST Test2 FAILED
    [junit] Test3.test1 ok
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0 sec
    [junit] Tests FAILED

BUILD SUCCESSFUL
Total time: 3 seconds
</output>

The message "Running Test3" is the odd output. It doesn't appear for the other
testcases. And it isn't correlated with the actual tests for Test3, which
actually are the last tests to be run.

In the actual situation I encountered in the real world, the first testcase was
failing, resulting in the output:
 [junit] Running org.apache.commons.logging.pathable.ParentFirstTestCase
 [junit] Tests run: 6, Failures: 1, Errors: 2, Time elapsed: 0.053 sec
 [junit] TEST org.apache.commons.logging.pathable.ChildFirstTestCase FAILED
 [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.01 sec

The error is actually occurring in ChildFirstTestCase. However having the
message "Running ....ParentFirstTestCase" immediately above the failing line is
extremely confusing; the problem isn't actually related to that test case at all.

I wonder whether this might have been introduced as a side-effect of
bugzilla#31962 (just a wild guess).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org