[Webtest] Web test woes

Derek Clarkson webtest@lists.canoo.com
Thu, 24 Feb 2005 12:47:37 +1100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C51A12.D13BAE10
Content-Type: text/plain


Hi all,
	First time user. Using Ant 1.6.2, webtest 1.7.

First thing I did was install and then try a modded version of the basic
sample to access our servers. It would not work. Kept coming up with 
BUILD FAILED
C:\canoo\tests\lpi-logon-test:6: taskdef A class needed by class
com.canoo.webtest.extension.GroovyStep cannot be found: org/codehau
s/groovy/control/CompilationFailedException

I had to add a line like this:
<fileset dir="../" includes="**/lib/**/*.jar"/>
To the classpaths to get it to work. Another fix I found was to copy the
latest groovy jar from the optional direction to the parent lib directory.

Then I tried the test only to have httpUnit crash and burn due to something
in the java script:
[testSpec] ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) -
runtimeError: message=[Setter configured but not implemented for pr
perty "status" for
com.gargoylesoftware.htmlunit.javascript.host.Window@1fa6d18. Cant set it
to: org.mozilla.javascript.Undefined@1
4e571] sourceName=[null] line=[0] lineSource=[null] lineOffset=[0]
[testSpec]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this
class: com.gargoylesoftware.htmlunit.ObjectInstantiati
nException
.....

So I disabled javascript testing and got:
[testSpec]  INFO (com.canoo.webtest.steps.request.Target) - -> gotoTarget(by
url): http://coopers.au.lpint.net/frame_default.jsp
<http://coopers.au.lpint.net/frame_default.jsp> 
[testSpec]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this
class: com.gargoylesoftware.htmlunit.ObjectInstantiati
nException
[testSpec] ERROR (com.canoo.webtest.steps.Step) - Cannot handle unexpected
exception in step InvokePage at C:\canoo\tests\lpi-logon
test:23:  with (stepId="get Login Page", url="/frame_default.jsp",
stepType="invoke")
[testSpec] com.gargoylesoftware.htmlunit.ObjectInstantiationException:
Exception when calling constructor [public com.gargoylesoftw
re.htmlunit.html.HtmlFrame(com.gargoylesoftware.htmlunit.html.HtmlPage,java.
util.Map)]
.....

Basically I'm reading this as httpunit not understanding something in the
HTML (frames?). 

The problem I have is that I want to setup a seris of tests for a
particularly badly written site which makes heavy usage of frames and
javascript. I need to test data entry and database results. Webtest looks
like the ideal tool, but the code behind it is looking rather immature at
the moment because I can't even get past the login page of the web site. 

Any help appreciated.


Regards,
Derek Clarkson
Global Applications
Lonely Planet Publications
ph: (03) 8379-8000
Direct: (03) 8379-8100-8401
"It's not a bug - it's an undocumented feature!"



______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.
------_=_NextPart_001_01C51A12.D13BAE10
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=
=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version=
 5.5.2654.45">
<TITLE>Web test woes</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 FACE=
=3D"Arial">First time user. Using Ant 1.6.2, webtest 1.7.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">First thing I did was install and then try=
 a modded version of the basic sample to access our servers. It would not=
 work. Kept coming up with </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">BUILD FAILED</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">C:\canoo\tests\lpi-logon-test:6: taskdef=
 A class needed by class com.canoo.webtest.extension.GroovyStep cannot be=
 found: org/codehau</FONT></P>

<P><FONT SIZE=3D2 FACE=
=3D"Arial">s/groovy/control/CompilationFailedException</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I had to add a line like this:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;fileset dir=3D&quot;../&quot;=
 includes=3D&quot;**/lib/**/*.jar&quot;/&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">To the classpaths to get it to work.=
 Another fix I found was to copy the latest groovy jar from the optional=
 direction to the parent lib directory.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Then I tried the test only to have=
 httpUnit crash and burn due to something in the java script:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[testSpec] ERROR=
 (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError: message=
=3D[Setter configured but not implemented for pr</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">perty &quot;status&quot; for=
 com.gargoylesoftware.htmlunit.javascript.host.Window@1fa6d18. Cant set it=
 to: org.mozilla.javascript.Undefined@1</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">4e571] sourceName=3D[null] line=3D[0]=
 lineSource=3D[null] lineOffset=3D[0]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[testSpec]&nbsp; INFO=
 (com.canoo.webtest.steps.Step) - Exception thrown from this class:=
 com.gargoylesoftware.htmlunit.ObjectInstantiati</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">nException</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">.....</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">So I disabled javascript testing and=
 got:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[testSpec]&nbsp; INFO=
 (com.canoo.webtest.steps.request.Target) - -&gt; gotoTarget(by url):=
 </FONT><A HREF=3D"http://coopers.au.lpint.net/frame_default.jsp"><U><FONT=
 COLOR=3D"#0000FF" SIZE=3D2 FACE=
=3D"Arial">http://coopers.au.lpint.net/frame_default.jsp</FONT></U></A></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">[testSpec]&nbsp; INFO=
 (com.canoo.webtest.steps.Step) - Exception thrown from this class:=
 com.gargoylesoftware.htmlunit.ObjectInstantiati</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">nException</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[testSpec] ERROR=
 (com.canoo.webtest.steps.Step) - Cannot handle unexpected exception in=
 step InvokePage at C:\canoo\tests\lpi-logon</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">test:23:&nbsp; with (stepId=3D&quot;get=
 Login Page&quot;, url=3D&quot;/frame_default.jsp&quot;, stepType=
=3D&quot;invoke&quot;)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[testSpec]=
 com.gargoylesoftware.htmlunit.ObjectInstantiationException: Exception when=
 calling constructor [public com.gargoylesoftw</FONT></P>

<P><FONT SIZE=3D2 FACE=
=3D"Arial">re.htmlunit.html.HtmlFrame(com.gargoylesoftware.htmlunit.html.Ht=
mlPage,java.util.Map)]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">.....</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Basically I'm reading this as httpunit not=
 understanding something in the HTML (frames?). </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The problem I have is that I want to setup=
 a seris of tests for a particularly badly written site which makes heavy=
 usage of frames and javascript. I need to test data entry and database=
 results. Webtest looks like the ideal tool, but the code behind it is=
 looking rather immature at the moment because I can't even get past the=
 login page of the web site. </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any help appreciated.</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Regards,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial Black">Derek Clarkson</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Global Applications</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Lonely Planet Publications</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">ph: (03) 8379-8000</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Direct: (03) 8379-8100-8401</FONT>
<BR><FONT COLOR=3D"#C0C0C0" FACE=3D"Impact">&quot;It's not a bug - it's an=
 undocumented feature!&quot;</FONT>
</P>

</BODY>
</HTML>
<table><tr><td bgcolor=3D#ffffff><font color=
=3D#000000>________________________________________________________________=
______<br>
This email, including attachments, is intended only for the addressee<br>
and may be confidential, privileged and subject to copyright.  If you<br>
have received this email in error, please advise the sender and delete<br>
it.  If you are not the intended recipient of this email, you must not<br>
use, copy or disclose its content to anyone.  You must not copy or <br>
communicate to others content that is confidential or subject to <br>
copyright, unless you have the consent of the content owner.<br>
</font></td></tr></table>
------_=_NextPart_001_01C51A12.D13BAE10--