[Webtest] Question about moving Webtest early release to current release?

Tize Ma webtest@lists.canoo.com
Tue, 12 Jul 2005 10:33:27 -0400


This is a multi-part message in MIME format.

------_=_NextPart_001_01C586EF.3380B559
Content-Type: text/plain;
	charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit

Thank you very much, Marc.
My problem looks similar to that in another message (by Gooshy Gooshy). In the section where the step fails I have 
<setInputField description="Set the Username"
      name="j_username"
      value="${admin.username}" />
<setInputField description="Set the password"
      name="j_password"
      value="${admin.password}" />
<clickButton description="Submit the admin login form"
      name="submit1"/>

Those properties are defined in a properties file.

The console output is like:

[testSpec]  INFO (com.canoo.webtest.steps.Step) - Start Step: setInputField "Set the Username" (4/30)
 [testSpec]  INFO (com.canoo.webtest.engine.Context) - Current form set to (action=j_security_check)
 [testSpec]  INFO (com.canoo.webtest.steps.Step) - Start Step: setInputField "Set the password" (5/30)
 [testSpec]  INFO (com.canoo.webtest.steps.Step) - Start Step: clickButton "Submit the admin login form" (6/30)
 [testSpec]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> gotoTarget(by input): name=submit1 value=Login
 [testSpec]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled
 [testSpec]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect requested but followRedirects is disabled
 [testSpec] ERROR (com.canoo.webtest.steps.request.Target) - ScriptException: enclosed exception was "Wrapped com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "offsetTop" from undefined (scripts/adminUtils.js#874)"
 [testSpec]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class: com.canoo.webtest.engine.StepFailedException
 [testSpec]  INFO (com.canoo.webtest.steps.Step) - Message was: Step[clickButton "Submit the admin login form" (6/30)]: Script error executing at: clickbutton
 [testSpec]  INFO (com.canoo.webtest.ant.TestSpecificationTask) - Writing report using Report class: com.canoo.webtest.reporting.XmlReporter

It looks like the main problem here is that the property "offsetTop" is undefined. Somehow, the previous build of Webtest and IE seem to be fine with it. 
Thanks again.
Tize

-----Original Message-----
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] On Behalf Of Marc Guillemot
Sent: 2005年7月12日 7:32
To: webtest@lists.canoo.com
Subject: Re: [Webtest] Question about moving Webtest early release to current release?

Hi,

the messages from parser are only informative and not allways very good. These parser errors are not the cause of the 
failing tests. You have to look at the step that fails and the associated messages to find the origin of the problem.

Marc.

Tize Ma wrote:
> Hi, all,
>    I am trying to move Canoo Webtest release 457 (httpunit) to 916 
> (htmlunit). (Old release works great, but it is probably the time to 
> move to the new one) . The problem I face is that all tests that run 
> with build 457 do not run now. After I turn on showhtmlparseroutput in 
> config, I got a lot of errors like,
>  <error col="67" line="5" 
> url="http://ReTma:8080/rware/admin/frames.html">Missing whitespace 
> before attribute "SCROLLING".</error>
> And much more warnings.
> I experimented with option tag in the config with JavaScriptEnabled to 
> false, some errors go away and those steps passed. But there are still a 
> lot of similar errors. We do like to use the feature of supporting 
> JavaScript in the new release. Therefore turning off JavaScript is a 
> dumb idea even if it  temporarily solve any problem.
> So my question is, what is the proper way to "upgrade" webtest so that 
> the old tests will still work with the new build/release? What causes 
> the errors? and how to fix/get around them?
> Thanks a lot.
> Tize

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

------_=_NextPart_001_01C586EF.3380B559
Content-Type: text/html;
	charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-2022-jp">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>RE: [Webtest] Question about moving Webtest early release to current release?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Thank you very much, Marc.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">My problem looks similar to</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">that in another message (by Gooshy Gooshy)</FONT><FONT SIZE=2 FACE="Courier New">.</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">I</FONT><FONT SIZE=2 FACE="Courier New">n the section where the step fails I</FONT><FONT SIZE=2 FACE="Courier New"> have</FONT></SPAN><SPAN LANG="en-us"> </SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&lt;setInputField description=&quot;Set the Username&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;j_username&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;${admin.username}&quot; /&gt;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&lt;setInputField description=&quot;Set the password&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;j_password&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;${admin.password}&quot; /&gt;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&lt;clickButton description=&quot;Submit the admin login form&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;submit1&quot;/&gt;</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Th</FONT><FONT SIZE=2 FACE="Courier New">o</FONT><FONT SIZE=2 FACE="Courier New">se properties are defined in a properties file</FONT><FONT SIZE=2 FACE="Courier New">.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT><FONT SIZE=2 FACE="Courier New">he console output is like:</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">[testSpec]&nbsp; INFO (com.canoo.webtest.steps.Step) - Start Step: setInputField &quot;Se</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">t the Username&quot; (4/30)</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.engine.Context) - Current form set to (acti</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">on=j_security_check)</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.steps.Step) -</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"> Start Step: setInputField &quot;Se</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">t the password&quot; (5/30)</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.steps.Step) - Start Step: clickButton &quot;Subm</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">it the admin login form&quot; (6/30)</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.steps.request.ClickButton) - -&gt; gotoTarget(</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">by input): name=submit1 value=Login</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect</FONT></SPAN><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">requested but followRedirects is disabled</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (org.apache.commons.httpclient.HttpMethodDirector) - Redirect</FONT></SPAN><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">requested but foll</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">owRedirects is disabled</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec] ERROR (com.canoo.webtest.steps.request.Target) - ScriptException: en</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">closed exception was &quot;Wrapped com.gargoylesoftware.htmlunit.ScriptException: Typ</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">eError: Cannot read property &quot;offsetTop&quot; from undefined (scripts/admin</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">Utils.js#8</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">74)&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.steps.Step) - Exception thrown from this cl</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">ass: com.canoo.webtest.engine.StepFailedException</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.steps.Step) - Message was: Step[clickButton</FONT></SPAN><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&quot;Submit the admin login for</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">m&quot; (6/30)]: Script error executing at: click</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">button</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;[testSpec]&nbsp; INFO (com.canoo.webtest.ant.TestSpecificationTask) - Writing report</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"> using Report class: com.canoo.webtest.reporting.XmlReporter</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Courier New">It looks like the main problem here is that</FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">the</FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">property &quot;offsetTop&quot;</FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">is</FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">undefined</FONT></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.</FONT> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">Somehow, the previous build of Webtest and IE seem to be fine</FONT></SPAN><SPAN LANG="en-us"> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">with it.</FONT></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Thanks again.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Tize</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">-----Original Message-----<BR>
</FONT><FONT SIZE=2 FACE="Courier New">From:</FONT><FONT SIZE=2 FACE="Courier New"> webtest-admin@lists.canoo.com [<A HREF="mailto:webtest-admin@lists.canoo.com">mailto:webtest-admin@lists.canoo.com</A>]</FONT> <FONT SIZE=2 FACE="Courier New">On Behalf Of</FONT> <FONT SIZE=2 FACE="Courier New">Marc Guillemot<BR>
</FONT><FONT SIZE=2 FACE="Courier New">Sent:</FONT><FONT SIZE=2 FACE="Courier New"> 2005</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="SimSun">年</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">7</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="SimSun">月</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">12</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="SimSun">日</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> 7:32<BR>
</FONT><FONT SIZE=2 FACE="Courier New">To:</FONT><FONT SIZE=2 FACE="Courier New"> webtest@lists.canoo.com<BR>
</FONT><FONT SIZE=2 FACE="Courier New">Subject:</FONT><FONT SIZE=2 FACE="Courier New"> Re: [Webtest] Question about moving Webtest early release to current release?</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Hi,</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">the messages from parser are only informative and not allways very go</FONT><FONT SIZE=2 FACE="Courier New">od. These parser errors are not the cause of the </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">failing tests. You have to look at the step that fails and the associated messages to find the origin of the problem.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Marc.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Tize Ma wrote:</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; Hi, all,</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;&nbsp;&nbsp;&nbsp; I am trying to move Canoo Webtest release 457 (ht</FONT><FONT SIZE=2 FACE="Courier New">tpunit) to 916 </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; (htmlunit). (Old release works great, but it is probably the time to </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; move to the new one) . The problem I face is that all tests that run </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; with build 457 do not run now. After I turn on showhtmlparseroutput in </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; config, I got a lot</FONT> <FONT SIZE=2 FACE="Courier New">of errors like,</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;&nbsp; &lt;error col=&quot;67&quot; line=&quot;5&quot; </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; url=&quot;<A HREF="http://ReTma:8080/rware/admin/frames.html">http://ReTma:8080/rware/admin/frames.html</A>&quot;&gt;Missing whitespace </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; before attribute &quot;SCROLLING&quot;.&lt;/error&gt;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; And much more warnings.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; I experimented with option tag in the config with JavaScriptEnabled to </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; false, some errors go away and those steps passed. But there are still a </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; lot of similar errors. We do like to use the feature of supporting </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; JavaScript in the new release. Therefore turning off JavaScript is a </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; dumb idea even if it&nbsp; temporarily so</FONT><FONT SIZE=2 FACE="Courier New">lve any problem.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; So my question is, what is the proper way to &quot;upgrade&quot; webtest so that </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; the old tests will still work with the new build/release? What causes </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; the errors? and how to fix/get around them?</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; Thanks a lot.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt; Tize</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">______________________</FONT><FONT SIZE=2 FACE="Courier New">_________________________</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">WebTest mailing list</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">WebTest@lists.canoo.com</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"><A HREF="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</A></FONT></SPAN></P>

</BODY>
</HTML>
------_=_NextPart_001_01C586EF.3380B559--