Here the detailed logs of what happens (when using debug option).
It seems that the value (wt.htmlRepors.xlst) is set correctly once but then not 
forwarded to html report creator. Any ideas?


wt.htmlReports.init:
....
Setting project property: wt.htmlReports.report.title -> WebTest Test Report
Setting project property: wt.htmlReports.outputdir -> /work/ 
WebTests/SampleTest/results
Setting project property: wt.htmlReports.xslt -> 
/work/canoo_webtest/resources/WebTestReport.xsl
Setting project property: wt.htmlReports.xslt.summary -> 
/work/canoo_webtest/resources/WebTestReportSummaryExtractor.xsl
Setting project property: wt.htmlReports.xslt.overview -> 
/work/canoo_webtest/resources/WebTestReportOverview.xsl
    [mkdir] Created dir: /work/ WebTests/SampleTest/results/resources
+User datatype: fileScanner     org.codehaus.groovy.ant.FileScanner
fileset: Setup scanner in dir /work/canoo_webtest/resources with patternSet{ 
includes: [*.css, *.js, *.html, images/*.*] excludes: [] }
....
Property "wt.htmlReports.xslt" has not been set
Property "wt.htmlReports.report.time" has not been set
Property "wt.htmlReports.report.title" has not been set
...

wt.htmlReports:
.....
[groovyScript] Script: 
com.canoo.webtest.reporting.HTMLReportGenerator.shutdown()
     [xslt] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison
     [xslt] In file 
/work/ebox_HS_Software/Product/WebTests/SampleTest/results/001_Test1a/WebTestReport.xml
 time: 1341234538000
     [xslt] Out file 
/work/ebox_HS_Software/Product/WebTests/SampleTest/results/001_Test1a/WebTestReport.html
 time: 0
     [xslt] Style file ${wt.htmlReports.xslt} time: 0
     [xslt] Processing 
/work/WebTests/SampleTest/results/001_Test1a/WebTestReport.xml to 
/work/WebTests/SampleTest/results/001_Test1a/WebTestReport.html
     [xslt] Loading stylesheet 
/work/WebTests/SampleTest/tests/${wt.htmlReports.xslt}
     [xslt] Failed to process 
/work/WebTests/SampleTest/results/001_Test1a/WebTestReport.xml
+User datatype: fileScanner     org.codehaus.groovy.ant.FileScanner
[groovyScript] ERROR (com.canoo.webtest.reporting.HTMLReportGenerator) - Error 
formatting /work/ WebTests/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/WebTests/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]   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[groovyScript]   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[groovyScript]   at java.lang.reflect.Method.invoke(Method.java:616)
[groovyScript]   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[groovyScript]   at org.apache.tools.ant.Task.perform(Task.java:348)
[groovyScript]   at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:214)
[groovyScript]   at 
groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
[groovyScript]   at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:160)
[groovyScript]   at 
groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
[groovyScript]   at 
com.canoo.webtest.reporting.HTMLReportGenerator.format(HTMLReportGenerator.groovy:61)
[groovyScript]   at 
com.canoo.webtest.reporting.HTMLReportGenerator.this$2$format(HTMLReportGenerator.groovy)
[groovyScript]   at 
com.canoo.webtest.reporting.HTMLReportGenerator$this$2$format.call(Unknown 
Source)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
[groovyScript]   at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
[groovyScript]   at 
com.canoo.webtest.reporting.FormatTask.call(HTMLReportGenerator.groovy:81)
[groovyScript]   at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[groovyScript]   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[groovyScript]   at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[groovyScript]   at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[groovyScript]   at java.lang.Thread.run(Thread.java:636)
....

From: [email protected] [mailto:[email protected]] On 
Behalf Of Habbert, Michael (Key-Work)
Sent: Montag, 2. Juli 2012 13:01
To: [email protected]
Subject: [Webtest] AW: wt.htmlReports.xslt is not set when executing test from 
ant file

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]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 Im Auftrag von Merz, Daniel
Gesendet: Freitag, 29. Juni 2012 10:31
An: [email protected]<mailto:[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

Reply via email to