This is an (annoying) classpath issue.
If you take a look at the definition of the tasks it says it needs Xalan
2
If you get this version of xalan and put it in the lib directory I think
that fixes the problem.
Let me know how it goes...
Alan.

-----Original Message-----
From: Kazandjian Erik [mailto:[EMAIL PROTECTED]]
Sent: 14 November 2001 07:51
To: 'Ant User'
Subject: Junit test reports


Hello,

I'm trying to automise our Junit tests with Ant. Taht works but 'they'
want
a report every morning of the tests that ran during the night. I saw
that
there are some report tools for tests but I can't get them running. I'm
using junit3.7. Here is a sample opf my build.xml

<target name="facade_tests" depends="testsuite">                
        <junit printsummary="no">
        <classpath>
                        <pathelement path="${myenv.MY_JAVA_CLASSES}"/>
                        <pathelement path="${myenv.CLASSPATH}"/>
                        <pathelement
location="${myenv.ANT_HOME}/lib/optional.jar"/>
                        <pathelement
location="${myenv.ANT_HOME}/lib/ant.jar"/>
                </classpath>
      
      <batchtest fork="yes" todir="/home/integrator/.tests_output">
         <formatter type="xml"></formatter> 
         <fileset dir="${destdir}">
                <include
name="**/test/**/suites/FacadeTests.class"></include>
        </fileset>
      </batchtest>       
    </junit>
</target>


I get the following errors when I try to run this target

facade_tests:
    [junit] Exception in thread "main"
javax.xml.parsers.FactoryConfigurationError:
com.sun.xml.parser.DocumentBuilderFactoryImpl
    [junit]     at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFact
ory.
java:80)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.get
Docu
mentBuilder(XMLJUnitResultFormatter.java:81)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.sta
rtTe
stSuite(XMLJUnitResultFormatter.java:124)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireStartTe
stSu
ite(JUnitTestRunner.java:279)    [junit]        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe
stRu
nner.java:200)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitT
estR
unner.java:342)
    [junit] TEST com.siemens.square.test.suites.FacadeTests FAILED

BUILD SUCCESSFUL

Does anybody have any idea what I'm doing wrong ?


Thanks
Erik



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to