ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37099] New: - junit fails with xmlformatter and forkmode perbatch/once (but not pertest)
Date Fri, 14 Oct 2005 22:47:06 GMT
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=37099>.
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=37099

           Summary: junit fails with xmlformatter and forkmode perbatch/once
                    (but not pertest)
           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: david@hackerdude.com


I have an XML-formatted junit task declared as follows

<junit printsummary="withOutAndErr" haltonfailure="no" 
  haltonerror="no" showoutput="true" fork="yes" >
   <classpath>
     <pathelement path="${test.classpath}" />
   </classpath>                
   <batchtest todir="${build}/test/junit-reports">
     <fileset dir="${unittest.classes}">
       <include name="**/Test*.*" />
       <exclude name="**/Test*$*.*" />
     </fileset>
   </batchtest>
   <formatter type="xml" />
</junit>

It works perfectly until I try to use forkmode="once" or forkmode="perbatch"
(the default forkmode="pertest" works fine.


The error on the console is that there was an error on the first test class on
the fileset. A closer look (on the XML file it produces) reveals the following:

  <error
message="testsfile=C:\work\branches\HEAD\workspace31\fcdashboard\junittestcases1710912823/properties"
type="java.lang.ClassNotFoundException">java.lang.ClassNotFoundException:
testsfile=C:\work\branches\HEAD\workspace31\fcdashboard\junittestcases1710912823/properties
at java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:141)</error> 

It looks like it is not passing the class name of the junit test runner to the
child vm, so the VM tries to interpret the first parameter
(message="testfile..") as the class name.

This does not happen when the forkmode is pertest.

Tried (and failed) on ant 1.6.5 and ant 1.6.2, with junit 3.8.1.

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


Mime
View raw message