I'm still having difficulty getting my reporting to work for webtest. I've started removing (and dividing) portions of my build file to make it simple to debug, but still get the same error. Can anyone tell me possible reasons why the results.html file isn't being created? Below is my build file and the output from running the build. Also, at the end of the output you can see where I 'ls' the ${webtest.home}/resources (/usr/local/sbin/canoo_webtest/resources/) directory and the ${webtest.resultpath} (/usr/local/www/customer.com/qa/canoo_webtest/webtest-results) directory to display where the files are.

Thank You,

Troy
troy AT spawn OR die dt com

***** MY BUILD FILE *****
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project SYSTEM "/usr/local/sbin/canoo_webtest/selftests/config/WebTest.dtd">

<project name="All Tests" basedir="." default="testSuite">
<property name="webtest.home" location="/usr/local/sbin/canoo_webtest" />
   <property name="resources.dir" value="${webtest.home}/resources"/>
<property name="test.dir" location="/usr/local/www/customer.com/qa/canoo_webtest" />
   <property name="test.file" value="mybuild_03.xml" />
<property name="webtest.resultpath" value="${test.dir}/webtest-results"/>
   <property name="webtest.resultfile" value="results.xml"/>
<property name="webtest.resultfile.html" value="${webtest.resultpath}/results.html"/>
   <import file="${webtest.home}/lib/taskdef.xml" />
<target name="init" description="Checks that needed properties are defined">
       <fail message="test.file should be set" unless="test.file" />
       <fail message="test.dir should be set" unless="test.dir" />
   </target>
<target name="testSuite" depends="init" description="Runs the Test Suite">
       <mkdir dir="${webtest.resultpath}" />
       <antcall target="test.suite" />
       <antcall target="formatResults" />
       <antcall target="copyResults" />
       <antcall target="makeIndexHTML" />
<!--        <antcall target="" />    -->
   </target>

<target name="formatResults" description="Formats the XML result file using XSL">
       <tstamp>
<format property="report.time" pattern="dd.MM.yyyy HH:mm" locale="us" />
       </tstamp>
       <style
               basedir="${resources.dir}"
               destdir="${webtest.resultpath}"
               includes="${webtest.resultpath}/${webtest.resultfile}"
               force="true"
               extension=".html"
               style="${resources.dir}/WebTestReport.xsl">
           <param name="reporttime" expression="${report.time}"/>
           <param name="title" expression="${ant.project.name}"/>
       </style>
   </target>

<target name="copyResults" description="Copies the resources needed by the html page to the same dir. The report must be ok too when opened from filesystem (without webserver)">
       <copy todir="${webtest.resultpath}">
           <fileset dir="${resources.dir}">
               <include name="report.css"/>
               <include name="showHide.js"/>
               <include name="images/*.*"/>
               <include name="results.html"/>
           </fileset>
       </copy>
   </target>
<target name="makeIndexHTML" description="Copies the results.xml or results.html to index.html or something like that" > <copy tofile="${webtest.resultpath}/index.html" file="${webtest.resultpath}/results.html"/> <echo message="Webtest result overview available in ${webtest.resultfile.html}"/>
   </target>

   <target name="test.suite">
       <ant antfile="sa_loginpage_02.xml"/>
       <ant antfile="sa_login_02.xml"/>
   </target>
</project>
***** END OF BUILD FILE *****
***** OUTPUT *****
[EMAIL PROTECTED] canoo_webtest]$ webtest mybuild_03.xml
Will use java
Buildfile: mybuild_03.xml
Trying to override old definition of task sleep

init:

testSuite:

test.suite:

loginPageTest:
[echo] Start execution of 'mybuild_03.xml' in dir '/usr/local/www/customer.com/qa/canoo_webtest' [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1217. [config] INFO (com.canoo.webtest.engine.Configuration) - Surfing with browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98) [config] INFO (com.canoo.webtest.engine.Configuration) - Configuring 1 HTTP header field(s) [config] INFO (com.canoo.webtest.engine.Configuration) - Configured header "followRedirects": true [invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke "Get Login Page" (1/2) [invoke] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by URL: index.php [invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting response for url: https://secure.customerdb.com/admin/index.php [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (com.canoo.webtest.engine.Context) - Content of window changed to https://secure.customerdb.com/admin/index.php [invoke] INFO (com.canoo.webtest.engine.Context) - Content loaded in newly opened window, its content will become current response [invoke] INFO (com.canoo.webtest.engine.Context) - Current form set to none [invoke] INFO (com.canoo.webtest.engine.Context) - Current response now: https://secure.customerdb.com/admin/index.php [verifyTitle] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: verifyTitle "Verify Login Page Title" (2/2) INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully created.

loginTest:
[echo] Start execution of 'mybuild_03.xml' in dir '/usr/local/www/customer.com/qa/canoo_webtest' [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1217. [config] INFO (com.canoo.webtest.engine.Configuration) - Surfing with browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98) [config] INFO (com.canoo.webtest.engine.Configuration) - Configuring 1 HTTP header field(s) [config] INFO (com.canoo.webtest.engine.Configuration) - Configured header "followRedirects": true [invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke "Login" (1/7) [invoke] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by URL: index.php [invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting response for url: https://secure.customerdb.com/admin/index.php [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [invoke] INFO (com.canoo.webtest.engine.Context) - Content of window changed to https://secure.customerdb.com/admin/index.php [invoke] INFO (com.canoo.webtest.engine.Context) - Content loaded in newly opened window, its content will become current response [invoke] INFO (com.canoo.webtest.engine.Context) - Current form set to none [invoke] INFO (com.canoo.webtest.engine.Context) - Current response now: https://secure.customerdb.com/admin/index.php [verifyTitle] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: verifyTitle "Verify Login Page Title" (2/7) [selectForm] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: selectForm "Selects the Login Form" (3/7) [selectForm] INFO (com.canoo.webtest.engine.Context) - Current form set to (action=/admin/index.php) [setInputField] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: setInputField "Selects and sets the Username Field" (4/7) [setInputField] INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep) - Found 1 suitable fields, considering only the first one [setInputField] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: setInputField "Selects and sets the Password Field" (5/7) [setInputField] INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep) - Found 1 suitable fields, considering only the first one [clickButton] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickButton "Clicks the Login button" (6/7) [clickButton] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by clickButton with name: submitLogin [clickButton] INFO (com.canoo.webtest.steps.request.ClickButton) - -> findTarget(by input): name=submitLogin value= [clickButton] INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled [clickButton] INFO (com.canoo.webtest.engine.Context) - Content of window changed to https://secure.customerdb.com/admin/index.php?submitLogin_x=0&submitLogin_y=0&; [clickButton] INFO (com.canoo.webtest.engine.Context) - Content of current window changed, it will become current response [clickButton] INFO (com.canoo.webtest.engine.Context) - Current form set to none [clickButton] INFO (com.canoo.webtest.engine.Context) - Current response now: https://secure.customerdb.com/admin/index.php?submitLogin_x=0&submitLogin_y=0&; [verifyText] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: verifyText "Verifies unique text after login" (7/7) INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully created.

formatResults:
[style] Transforming into /usr/local/www/customer.com/qa/canoo_webtest/webtest-results

copyResults:

makeIndexHTML:

BUILD FAILED
/usr/local/www/customer.com/qa/canoo_webtest/mybuild_03.xml:24: The following error occurred while executing this line: /usr/local/www/customer.com/qa/canoo_webtest/mybuild_03.xml:56: Warning: Could not find file /usr/local/www/customer.com/qa/canoo_webtest/webtest-results/results.html to copy.

Total time: 23 seconds
[EMAIL PROTECTED] canoo_webtest]$ cd /usr/local/sbin/canoo_webtest/resources/
[EMAIL PROTECTED] resources]$ ls
images responseBrowserCommands.html responseBrowser.js showHide.js WebTestReport.xsl report.css responseBrowser.html responseBrowserPreviews.html sorttable.js webtestsRunner.xml [EMAIL PROTECTED] resources]$ cd /usr/local/www/customer.com/qa/canoo_webtest/webtest-results
[EMAIL PROTECTED] webtest-results]$ ls
images  report.css  results.xml  showHide.js
[EMAIL PROTECTED] webtest-results]$ ***** END OF OUTPUT *****
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to