Hi Troy,
> Today I decided to make WebTest create a
> directory for the results based on the timestamp from when the test was
> run. It does create a directory named after the timestamp with
> everything except the "results.html" file. I even added <include
> name="results.html"/> to a portion of my script, but same results. Does
> anyone know what's going on here?
The webtest.resultpath property already points to the new dir when calling
the
formatting (basedir, destdir).
> It seems like something in the
> background is hard-coded.
Don't know what 'something' refers to.
> Do I have to have my previous report
> over-written by the current one every time I run a test?
You delete the old reports in the cleanup target.
cheers
Mittie
> Below is my
> script.
>
> Thank You,
>
> Troy
> troy at spawn or die dot com
> ------------------------------------------------------------------
> ----------------------------
> <?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">
> <tstamp>
> <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss" />
> </tstamp>
> <property name="webtest.home"
> location="/usr/local/sbin/canoo_webtest" />
> <property name="test.dir"
> location="/usr/local/www/customer.com/qa/canoo_webtest" />
> <property name="test.file" value="mybuild_02.xml" />
> <property name="webtest.resultpath"
> value="${test.dir}/webtest-results/${timestamp}"/>
> <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="cleanUp" />
> <antcall target="test.suite" />
> <antcall target="formatResults" />
> </target>
>
> <target name="cleanUp" description="Deletes all generated files"
> unless="webtest.skipCleanup">
> <delete>
> <fileset dir="${webtest.resultpath}" includes="**/*.*ml" />
> </delete>
> </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>
> <property name="resources.dir" value="${webtest.home}/resources"/>
> <style
> basedir="${webtest.resultpath}"
> destdir="${webtest.resultpath}"
> includes="${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>
> <!-- copy 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>
> <echo message="Webtest result overview available in
> ${webtest.resultfile.html}"/>
> </target>
>
> <target name="test.suite">
> <ant antfile="customer_loginpage_02.xml"/>
> <ant antfile="customer_login_02.xml"/>
> </target>
> </project>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest