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 35499] New: - junit batchtest fails if fileset created via zipfileset
Date Fri, 24 Jun 2005 14:34:56 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=35499>.
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=35499

           Summary: junit batchtest fails if fileset created via zipfileset
           Product: Ant
           Version: 1.6.2
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: msnare@nc.rr.com


if you create a zipfileset from a jar, then use the refid of that zipfileset in 
the fileset inside the junit batchtest task AND you are using the xml formatter, 
the batchtest will fail..

It does not appear to be correctly replacing file separators with dots (.) so it 
ends up trying to run a test on a a file with file separators in it

Example build.xml snippet and associated output:

<target name="test">
	
	<!-- Set up zipfilesets -->
	<zipfileset id="zip_set" src="jars/some_jar.jar" includes="**/*Test.
class"/>
	
	<junit>
		<classpath>
			....
		</classpath>
		
		<formatter type="brief"/>
		
		<batchtest todir="test">
			<fileset refid="zip_set"/>
		</batchtest>
	
	</junit>
	
</target>

Output - assume the jar file contains one matching test: "my/package/MyTest.
class":

test:
    [junit] Testsuite: my/package/MyTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

    [junit] Null Test:  Caused an ERROR
    [junit] my/package/MyTest
    [junit] java.lang.ClassNotFoundException: my/package/MyTest
    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Unknown Source)


    [junit] Test my/package/MyTest FAILED

-Mike

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