Hi Troy,

where did you get this command line from? It doesn't make sense and the error is normal.

Back to the beginning: I think that you should use from the bin dir of the build.zip you downloaded from WebTest website (from one of your log output it seemed, that you've built WebTest by yourself what is not necessary).

webtest.sh mybuild_04.xml

Marc.


Troy McGuire wrote:
Okay, so instead of typing "webtest.sh -buildfile mybuild_04.xml", I typed the following as was suggested on this list (I changed the name of mybuild_04.xml to build.xml to since the following method complained about using '-buildfile').

[EMAIL PROTECTED] canoo_webtest]$ java -classpath /usr/local/sbin/canoo_webtest/bin/webtest.sh build.xml

What I got for output was:

Exception in thread "main" java.lang.NoClassDefFoundError: build/xml

For the record, I never have (to my knowledge) started webtest using ant; don't even know how. I just use webtest.sh, but still can't get "results.html" to be created. So I decide to go back to how I was doing it, and got a "BUILD SUCCESSFUL". Okay, so I look at the index.html and it was created today (according to 'ls'), but the results.html has August 14th as it's date. Then I look at the index.html file in my browser and it has "Tests started at Thu Apr 27 12:27:23 PDT 2006" and "Created using Canoo Webtest <http://webtest.canoo.com> (R_1274). Report created at 27.04.2006 12:27". Knowing that I'm using Webtest 2.0-1217 and that today is August 16, I figure I had better move all the contents of "webtest-results" out and run the build again. I didn't change anything on the buildfile, or the canoo installation between runs today (other than moving the files out of the "webtest-results" directory) and I get:
.
.
.
[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:
[copy] Copying 13 files to /usr/local/www/customer.com/qa/canoo_webtest/webtest-results
makeIndexHTML:

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

Total time: 17 seconds
[EMAIL PROTECTED] canoo_webtest]$ cd webtest-results/
[EMAIL PROTECTED] webtest-results]$ ls
images
report.css
response_1155777838511_invoke.html
response_1155777840462_clickButton.html
response_1155777839757_invoke.html
results.xml
showHide.js
---------------------------------------
Below is the buildfile I am using. I've been playing around with it from suggestions from the list, so I'm not sure if I've messed something up, or if it still looks like it should work.

<?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" />
   <import file="${webtest.home}/lib/taskdef.xml" />

   <property name="resources.dir" value="${webtest.home}/resources"/>
<property name="test.dir" location="/usr/local/www/customer.com/qa/canoo_webtest" /> <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"/> <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="${webtest.resultpath}"
               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.html to index.html" > <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_04.xml"/>
       <ant antfile="sa_login_04.xml"/>
   </target>
</project>

Does anyone have any ideas as to what is going on? I had this working at one point with a single test, and it seems like it wants to work (got a "Build Successful" on occasion like today). However, if I can't get Webtest to generate a report it doesn't do me much good as a testing tool. Anyone have luck with Jameleon or Sahi? I've started installing those since this doesn't seem to have a fix so far.

Thanks,

Troy



Denis N. Antonioli wrote:
Hi Troy

On 12 août 06, at 23:36, Troy McGuire wrote:

Do you have any suggestions on how to get around the classpath issue. Would it be something like "java -classpath <path>webtest.sh build.xml"?

Yes.
Use the installation provided with webtest and start webtest with the webtest scripts instead of directly with ant.
The scripts take care of setting up the classpath correctly.

Besides, when upgrading between webtest release, throw away the old <WEBTEST_HOME>/lib, and use the fresh copy that is in the release. Copying the new release over an old one opens the door to all kinds of jar file incompatibilities.

For reference: <http://webtest.canoo.com/webtest/manual/install.html>.

Best
    dna

--Anyone remember the (dare I say "good") old days when people wrote useful software that did useful things, rather than writing incomprehensible specifications?
  -- Andrzej Jan Taramina on the xml-dev mailing list, Sun, 04 Apr 2004


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to