Hi Daniel, try to run the webtests with debug option for ant (-d) so you can verify the correct value for: wt.htmlReports.xslt
With regards Michael Habbert Michael Habbert Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany | www.key-work.de<http://www.key-work.de> Fon: +49-721-78203-269 | E-Mail: [email protected]<mailto:[email protected]> | Fax: +49-721-78203-10 Key-Work Consulting GmbH, Karlsruhe, HRB 108695, HRG Mannheim Gesch?ftsf?hrer: Andreas Stappert, Tobin Wotring Von: [email protected] [mailto:[email protected]] Im Auftrag von Merz, Daniel Gesendet: Freitag, 29. Juni 2012 10:31 An: [email protected] Betreff: [Webtest] wt.htmlReports.xslt is not set when executing test from ant file Hi all During organizing my tests into subfolders I struggled over following error. The output shows that the test is executed, and the report (WebTestReport.xml) is created, but during generating the overview page a file not found exception is thrown (java.io.FileNotFoundException: /work/SampleTest/tests/${wt.htmlReports.xslt} (No such file or directory)). It seems that the variable wt.htmlReports.xslt is not set. When the same webtest "Test1a" is executed in build.xml everythings works fine. I hope you have an idea how to fix it. Below all the 3 files and the console output Best regards Daniel >>>>> build.xml >>>>>>>>> <?xml version="1.0"?> <project name="MyTests" basedir="." default="wt.full"> <property name="wt.groovyTests.skip" value="skip" /> <property name="webtest.home" location="/work/canoo_webtest" /> <import file="${webtest.home}/webtest.xml"/> <target name="wt.testInWork"> <ant dir="tests" antfile="allTests.xml"/> </target> </project> <<<<< build.xml <<<<<<<<< >>>>> tests/allTests.xml >>>>>>>>> <?xml version="1.0"?> <project name="all" default="all"> <target name="all"> <ant antfile="test1/test1.xml"/> </target> </project> <<<<< tests/allTests.xml <<<<<<<<< >>>>> tests/test1/test1.xml >>>>>>>>> <?xml version="1.0"?> <project name="test1" default="test1"> <target name="test1"> <webtest name="Test1a"> <invoke url="http://www.google.com" description="google home" /> <verifyText description="google somewhere" text="google" /> </webtest> </target> </project> <<<<< tests/test1/test1.xml <<<<<<<<< >>>>> Output >>>>>>>>> .... [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Starting webtest "Test1a" (/work/SampleTest/tests/test1/test1.xml:4: ) [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1813. ... [invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke "google home" (1/2) .... [verifyText] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: verifyText "google somewhere" (2/2) INFO (com.canoo.webtest.ant.WebtestTask) - Finished executing webtest "Test1a" (/work/SampleTest/tests/test1/test1.xml:4: ) INFO (com.canoo.webtest.reporting.XmlReporter) - Writing report to /work/SampleTest/results/001_Test1a/WebTestReport.xml INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully created. wt.groovyTests: wt.parallel.waitForCompletion: wt.htmlReports.init: [mkdir] Created dir: /work/SampleTest/results/resources [echo] Formatting /work/SampleTest/results/001_Test1a/WebTestReport.xml to HTML in folder /work/SampleTest/results/001_Test1a [copy] Copying 22 files to /work/SampleTest/results/resources [xslt] Processing /work/SampleTest/results/001_Test1a/WebTestReport.xml to /work/SampleTest/results/001_Test1a/WebTestReport.html [xslt] Loading stylesheet /work/SampleTest/tests/${wt.htmlReports.xslt} [xslt] Failed to process /work/SampleTest/results/001_Test1a/WebTestReport.xml [copy] Copying 1 file to /work/SampleTest/results wt.htmlReports: [echo] Waiting for completion of background generation of single reports [groovyScript] ERROR (com.canoo.webtest.reporting.HTMLReportGenerator) - Error formatting /work/SampleTest/results/001_Test1a/WebTestReport.xml done [groovyScript] : The following error occurred while executing this line: [groovyScript] /work/canoo_webtest/webtest.xml:279: java.io.FileNotFoundException: /work/SampleTest/tests/${wt.htmlReports.xslt} (No such file or directory) [groovyScript] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:541) [groovyScript] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394) [groovyScript] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .... [groovyScript] Caused by: /work/canoo_webtest/webtest.xml:279: java.io.FileNotFoundException: /work/SampleTest/tests/${wt.htmlReports.xslt} (No such file or directory) [groovyScript] at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:720) [groovyScript] at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:333) [groovyScript] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) .... [echo] Generating WebTestOverview [groovyScript] WARN (com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl) - Obsolete content type encountered: 'text/javascript'. wt.openResultFile.init: wt.openResultFile: [echo] Opening result file /work/SampleTest/results/index.html with firefox wt.junitLikeReports: BUILD FAILED /work/canoo_webtest/webtest.xml:444: input file /work/SampleTest/results/WebTestOverview.xml does not exist <<<<< Output <<<<<<<<< Ant version: 1.7.0 Java version: 1.6.0_18 Webtest: 3.0

