[Webtest] Canoo webtest for AJAX applications

Venkatesh Babu webtest@lists.canoo.com
Wed, 4 Oct 2006 14:28:01 +0530


------=_Part_89739_28785.1159952281283
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc,

Thanks for your reply.

Just have one doubt about:

"choose to simulate a Mozilla browser" ..

I couldn't exactly get how to do this in canoo webtest? Can we specify canoo
to use a particular browser ? If so, how to specify? I mean what properties
should we set to achieve this?

Thank you,
Venkatesh


On 10/4/06, Marc Guillemot <mguillemot@yahoo.fr> wrote:
>
> Hi Venkatesh,
>
> htmlunit 1.9 (currently shipped with WebTest) only recognizes 1 of the
> multiple XMLHttpRequest ActiveX flavours (apparently not the one you
> use). This has been fixed in htmlunit's SVN so you can build htmlunit
> from its source and use it in place of version 1.9.
> Alternatively you can choose to simulate a Mozilla browser as the native
> XMLHttpRequest object is supported.
>
> AJAX is supported... to some extend. I suppose that more need to be made
> but that WebTest can be a really good solution to test AJAX web
> applications. In particularly it could be possible to turn asynchron
> request synchron to ensure that tests execute always the same what is
> not possible in a normal browser.
>
> Marc.
>
> Venkatesh Babu wrote:
> > Hello All,
> >
> > We are using canoo webtest for testing our webapp.
> > Recently we added a few pages makin AJAX requests to
> > the server. and since then, the webtest is throwing
> > exceptions:
> >
> >      [java] [clickLink] ERROR
> >
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MSXML2.XMLHTTP.5.0.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> >
> > MSXML2.XMLHTTP.4.0.]
> > sourceName=[
> http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MSXML2.XMLHTTP.3.0.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> >
> > MSXML2.XMLHTTP.]
> > sourceName=[
> http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MICROSOFT.XMLHTTP.1.0.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> >
> > MICROSOFT.XMLHTTP.1.]
> > sourceName=[
> http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MICROSOFT.XMLHTTP.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> >
> > MSXML2.XMLHTTP.5.0.]
> > sourceName=[
> http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MSXML2.XMLHTTP.4.0.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> >
> > MSXML2.XMLHTTP.3.0.]
> > sourceName=[
> http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> >      [java] [clickLink] ERROR
> > (com.gargoylesoftware.htmlunit.ScriptEngine) -
> > runtimeError: message=[ActiveXObject Error: no map for
> > MSXML2.XMLHTTP.]
> > sourceName=[
> > http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js]
> > line=[614] lineSource=[null] lineOffset=[0]
> >
> > Can anybody help me and let me know why are we getting
> > this error? Does canoo support AJAX requests to be
> >
> > made?
> >
> > Thank you,
> > Venkatesh
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_89739_28785.1159952281283
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc,<br><br>Thanks for your reply.<br><br>Just have one doubt about:<br><br>&quot;choose to simulate a Mozilla browser&quot; ..<br><br>I couldn't exactly get how to do this in canoo webtest? Can we specify canoo to use a particular browser ? If so, how to specify? I mean what properties should we set to achieve this?
<br><br>Thank you,<br>Venkatesh<br><br><br><div><span class="gmail_quote">On 10/4/06, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Venkatesh,<br><br>htmlunit 1.9 (currently shipped with WebTest) only recognizes 1 of the<br>multiple XMLHttpRequest ActiveX flavours (apparently not the one you<br>use). This has been fixed in htmlunit's SVN so you can build htmlunit
<br>from its source and use it in place of version 1.9.<br>Alternatively you can choose to simulate a Mozilla browser as the native<br>XMLHttpRequest object is supported.<br><br>AJAX is supported... to some extend. I suppose that more need to be made
<br>but that WebTest can be a really good solution to test AJAX web<br>applications. In particularly it could be possible to turn asynchron<br>request synchron to ensure that tests execute always the same what is<br>not possible in a normal browser.
<br><br>Marc.<br><br>Venkatesh Babu wrote:<br>&gt; Hello All,<br>&gt;<br>&gt; We are using canoo webtest for testing our webapp.<br>&gt; Recently we added a few pages makin AJAX requests to<br>&gt; the server. and since then, the webtest is throwing
<br>&gt; exceptions:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt;<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MSXML2.XMLHTTP.5.0.]
<br>&gt; sourceName=[<br>&gt; <a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt;<br>&gt; MSXML2.XMLHTTP.4.0.]<br>&gt; sourceName=[<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">
http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -
<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MSXML2.XMLHTTP.3.0.]<br>&gt; sourceName=[<br>&gt; <a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js
</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt;
<br>&gt; MSXML2.XMLHTTP.]<br>&gt; sourceName=[<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MICROSOFT.XMLHTTP.1.0.]<br>&gt; sourceName=[<br>
&gt; <a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR
<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt;<br>&gt; MICROSOFT.XMLHTTP.1.]<br>&gt; sourceName=[<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">
http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -
<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MICROSOFT.XMLHTTP.]<br>&gt; sourceName=[<br>&gt; <a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js
</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt;
<br>&gt; MSXML2.XMLHTTP.5.0.]<br>&gt; sourceName=[<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MSXML2.XMLHTTP.4.0.]<br>&gt; sourceName=[<br>&gt; 
<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR
<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt;<br>&gt; MSXML2.XMLHTTP.3.0.]<br>&gt; sourceName=[<a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">
http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java] [clickLink] ERROR<br>&gt; (com.gargoylesoftware.htmlunit.ScriptEngine) -
<br>&gt; runtimeError: message=[ActiveXObject Error: no map for<br>&gt; MSXML2.XMLHTTP.]<br>&gt; sourceName=[<br>&gt; <a href="http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js">http://fiesta-in.localhost:8080/prelaunch/common/js/prelaunch.js
</a>]<br>&gt; line=[614] lineSource=[null] lineOffset=[0]<br>&gt;<br>&gt; Can anybody help me and let me know why are we getting<br>&gt; this error? Does canoo support AJAX requests to be<br>&gt;<br>&gt; made?<br>&gt;<br>
&gt; Thank you,<br>&gt; Venkatesh<br>&gt;<br><br>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">
http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><br>

------=_Part_89739_28785.1159952281283--