ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natalia Bello <nbe...@isabel.be>
Subject Jxunit and Ant
Date Thu, 26 Jul 2001 12:56:03 GMT
Hi, 
has anyone tried to execute a Jxunit test from ant.
I have tried from the junit task and from the java task but i didnt
success...
Any ideas??
Thanks in advance,

Here is an overview of what i have tried:

My target is
 <target name="jxunit" description="run jxunit"> 
<!--  java -cp
%classpath%;%QuickJARs%\jxunit3.jar;%QuickJARs%\Quick4rt.jar;%QuickJARs%\Qui
ck4util.jar junit.textui.TestRunner net.sourceforge.jxunit.JXTestCase-->
  
  <java classname="junit.textui.TestRunner" >
         <arg value="net.sourceforge.jxunit.JXTestCase"/>
         <classpath>
              <pathelement location="d:/jxunit3.0.0/jars/jxunit3.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/quick4rt.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/quick4util.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/junit.jar"/>
              <pathelement
location="d:/jxunit3.0.0/jars/jakarta-regexp-1.2.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/crimson.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/jaxp1.1.jar"/>
         </classpath>
       </java>

  </target> 
       
and i get

jxunit:
.E
Time: 0.11
There was 1 error:
1) D:\JavaBuildFiles(net.sourceforge.jxunit.JXTestCase)
java.lang.LinkageError: loader constraints violated when linking
org/xml/sax/XMLReader class
	at com.jxml.quick.recycle.JAXP.<clinit>(JAXP.java:15)
	at com.jxml.quick.recycle.QParserPool.<clinit>(QParserPool.java:45)
	at com.jxml.quick.Quick.<clinit>(Quick.java:18)
	at net.sourceforge.jxunit.JXTestCase.getSchema(JXTestCase.java:232)
	at net.sourceforge.jxunit.JXTestCase.runTest(JXTestCase.java:209)
	at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:128)
	at org.apache.tools.ant.taskdefs.Java.run(Java.java:260)
	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:123)
	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
	at org.apache.tools.ant.Target.execute(Target.java:168)
	at org.apache.tools.ant.Project.runTarget(Project.java:911)
	at org.apache.tools.ant.Project.executeTarget(Project.java:539)
	at org.apache.tools.ant.Project.executeTargets(Project.java:513)
	at org.apache.tools.ant.Main.runBuild(Main.java:422)
	at org.apache.tools.ant.Main.main(Main.java:149)

FAILURES!!!
Tests run: 1,  Failures: 0,  Errors: 1

if i run 

 <target name="jxunit2" description="Unit Tests" > 
   	 <junit printsummary="yes" haltonfailure="no" fork="no">

         <classpath>
              <pathelement location="d:/jxunit3.0.0/jars/jxunit3.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/quick4rt.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/quick4util.jar"/>
              <pathelement location="d:/jxunit3.0.0/jars/junit.jar"/>
              <pathelement
location="d:/jxunit3.0.0/jars/jakarta-regexp-1.2.jar"/>
         </classpath>
   	  <test name="net.sourceforge.jxunit.JXTestCase"
todir="${module.basedir}\${testprojectname}">
                 <formatter type="plain"/>  
       	     <formatter type="xml"/> 
          </test> 
       </junit>
    </target> 
       
i get
Testsuite: net.sourceforge.jxunit.JXTestCase
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.1 sec

------------- Standard Output ---------------
line=0
column=0
------------- ---------------- ---------------
------------- Standard Error -----------------
org.xml.sax.SAXParseException: File
"classpath:///net/sourceforge/jxunit/jxu.qiml" not found.
	at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022)
	at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(Defa
ultEntityHandler.java:499)
	at
org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:304)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
	at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
	at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:200)
	at com.jxml.quick.engine.QCMLBindings.parse(QCMLBindings.java:67)
	at com.jxml.quick.Quick.uniqueParse(Quick.java:585)
	at com.jxml.quick.Quick.uniqueParse(Quick.java:562)
	at com.jxml.quick.Quick.parseQIML(Quick.java:522)
	at com.jxml.quick.Quick.parseSchema(Quick.java:550)
	at net.sourceforge.jxunit.JXTestCase.getSchema(JXTestCase.java:232)
	at net.sourceforge.jxunit.JXTestCase.runTest(JXTestCase.java:209)
	at junit.framework.TestCase.runBare(TestCase.java:140)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:131)
	at junit.framework.TestSuite.runTest(TestSuite.java:173)
	at junit.framework.TestSuite.run(TestSuite.java:168)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(Unknown
Source)
	at org.apache.tools.ant.Target.execute(Target.java:168)
	at org.apache.tools.ant.Project.runTarget(Project.java:911)
	at org.apache.tools.ant.Project.executeTarget(Project.java:539)
	at org.apache.tools.ant.Project.executeTargets(Project.java:513)
	at org.apache.tools.ant.Main.runBuild(Main.java:422)
	at org.apache.tools.ant.Main.main(Main.java:149)
------------- ---------------- ---------------
Testcase: D:\JavaBuildFiles took 0.88 sec
	Caused an ERROR
org.xml.sax.SAXParseException: File
"classpath:///net/sourceforge/jxunit/jxu.qiml" not found.
java.lang.Error: org.xml.sax.SAXParseException: File
"classpath:///net/sourceforge/jxunit/jxu.qiml" not found.
	at net.sourceforge.jxunit.JXTestCase.getSchema(JXTestCase.java:242)
	at net.sourceforge.jxunit.JXTestCase.runTest(JXTestCase.java:209)
	at junit.framework.TestCase.runBare(TestCase.java:140)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:131)
	at junit.framework.TestSuite.runTest(TestSuite.java:173)
	at junit.framework.TestSuite.run(TestSuite.java:168)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(Unknown
Source)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(Unknown
Source)
	at org.apache.tools.ant.Target.execute(Target.java:168)
	at org.apache.tools.ant.Project.runTarget(Project.java:911)
	at org.apache.tools.ant.Project.executeTarget(Project.java:539)
	at org.apache.tools.ant.Project.executeTargets(Project.java:513)
	at org.apache.tools.ant.Main.runBuild(Main.java:422)
	at org.apache.tools.ant.Main.main(Main.java:149)

Mime
View raw message