Project

Profile

Help

Problem running junitreport ant task

Added by Anonymous about 20 years ago

Legacy ID: #2801635 Legacy Poster: Mike Hedman (mhedman)

Hello, <<first off, sorry for posting this in the bug system first, I had intended to post on the forum>> I have an ant file that runs a bunch of JUnit tests, then uses the junitreport task to transform the test results into an HTML report. This task fails if I have Saxon on my classpath (and works fine if I remove Saxon from the classpath). I'm using 8.1.1. (it also failed with 8.1) The ant task is using Xalan Java 2.4.1. Here's a copy of the error message: Error at (anonymous type) on line 48 of file:///C:/ngp_tools/apache-ant-1.6.1/etc/junit-frames.xsl: javax.xml.transform.TransformerConfigurationException: Unknown extension element Here's line 48 of the file it's trying to transform: <xsl:template match="testsuites"> I have confidence that there's nothing wrong with the xsl file, as I've used it for quite a while without any previous problems. Any ideas would be appreciated. Thanks, Mike


Replies (4)

Please register to reply

RE: Problem running junitreport ant task - Added by Anonymous about 20 years ago

Legacy ID: #2803637 Legacy Poster: Michael Kay (mhkay)

I think I need to see a more complete stylesheet to help you diagnose this error. Michael Kay

RE: Problem running junitreport ant task - Added by Anonymous about 20 years ago

Legacy ID: #2803745 Legacy Poster: Mike Hedman (mhedman)

Michael, Thanks for your reply (and for your book!). The specific file that it's failing on is (and I'm hoping you have ant installed): ...\apache-ant-1.6.1\etc\junit-frames.xsl I'm of the opinion that this is a classpath/version problem rather than an issue with saxon not being able to sort through this one xsl file. Ant, by default, uses Xalan, and I'm wondering if java is getting confused when it also finds Saxon on the classpath. If it would be helpful, I can work up a small ant script that would illustrate the problem. Mike

RE: Problem running junitreport ant task - Added by Anonymous about 20 years ago

Legacy ID: #2804185 Legacy Poster: Michael Kay (mhkay)

This stylesheet is full of Xalan-specific extensions such as: <redirect:write file="{$output.dir}/index.html"> <xsl:call-template name="index.html"/> </redirect:write> You need to configure Ant, or arrange the classpath, so that Xalan is used to process this stylesheet. Michael Kay

RE: Problem running junitreport ant task - Added by Anonymous about 20 years ago

Legacy ID: #2806887 Legacy Poster: Mike Hedman (mhedman)

Michael, Thanks for your replies. I got around this by removing Saxon from my system classpath. I'm doing my development in XMLSpy, so I just hardcode the path to Saxon in XMLSpy there so that there is no classpath dependency. Mike

    (1-4/4)

    Please register to reply