[Webtest] Dealing with browsers?
Robert Bodziony
Robert Bodziony" <robert.bodziony@gmail.com
Thu, 10 Jan 2008 13:32:18 +0100
------=_Part_5869_1964540.1199968338123
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
hi
using latest? build 1646 config headers works :)
Regards,
Robert
2008/1/10, rune@runemolden.com <rune@runemolden.com>:
>
> Hi,
>
> I really enjoy WebTest as a test framework for running browser
> simulated tests for web applications, but I have experienced some
> issues which I will address in this post.
>
> I'm trying to define a different browser than the default one, but
> this feature doesn't seem to work as expected.
> My config file is like this:
> <config
> host="the name of the server I'm running the against"
> port="80"
> protocol="http"
> basepath=""
> summary="true"
> saveresponse="true"
> resultfile="${wt.resultfile}"
> resultpath="${wt.resultpath}"
> haltonfailure="false"
> haltonerror="false"
> autorefresh="true"
> >
> <header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0
> ;
> Windows NT 5.1; Hotbar 3.0)" />
> <!-- List of User-Agents:
> http://www.user-agents.org/index.shtml?moz -->
> <header name="accept-encoding" value="gzip,deflate" />
> </config>
>
>
> The webtest log yields the following:
> [...]
> [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
> R_1551.
> [config] INFO (com.canoo.webtest.engine.Configuration) - Using
> browser version (Microsoft Internet Explorer, 4.0 (compatible; MSIE
> 6.0b; Windows 98), Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
> Hotbar 3.0), 1.2, 6.0). If the javascript support is not as expected,
> then it's time to go into the sources
> [config] INFO (com.canoo.webtest.engine.Configuration) -
> Configuring 2 HTTP header field(s)
> [config] INFO (com.canoo.webtest.engine.Configuration) - Skipped
> User-Agent header as it has already been configured in the
> BrowserVersion
> [config] INFO (com.canoo.webtest.engine.Configuration) -
> Configured header "accept-encoding": gzip,deflate
> [...]
>
> The access log on the web server says that the User-Agent field in the
> HTTP header is "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
> Hotbar 3.0)" for all requests the tests executed generate, which is
> correct according to what I declared in my <config> section.
>
> The issues I'm pointing at here is the strange logging information
> WebTest yields in the console. The logging information WebTest yields
> is very confusing and doesn't really tell what's going on. I really
> miss some good documentation concerning how to simulate different
> kinds of browser during tests, how to do this in a proper way etc.
>
> If anyone has some experience with this, please to not hesitate to
> reply on this post. I also believe the project team developing and
> documenting WebTest should develop some additional documentation on
> this topic and refactor the WebTest code in order to define less
> confusing log entries. I know that WebTest uses HtmlUnit in order to
> simulate browsers, but I still believe these issues are within the
> scope of their work.
>
> Kind regards,
> Rune
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>
------=_Part_5869_1964540.1199968338123
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
hi <br> using latest? build 1646 config headers works :)<br> Regards,<br> Robert<br><br><div><span class="gmail_quote">2008/1/10, <a href="mailto:rune@runemolden.com">rune@runemolden.com</a> <<a href="mailto:rune@runemolden.com">
rune@runemolden.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I really enjoy WebTest as a test framework for running browser
<br>simulated tests for web applications, but I have experienced some<br>issues which I will address in this post.<br><br>I'm trying to define a different browser than the default one, but<br>this feature doesn't seem to work as expected.
<br>My config file is like this:<br><config<br> host="the name of the server I'm running the against"<br> port="80"<br> protocol="http"<br> basepath=""
<br> summary="true"<br> saveresponse="true"<br> resultfile="${wt.resultfile}"<br> resultpath="${wt.resultpath}"<br> haltonfailure="false"
<br> haltonerror="false"<br> autorefresh="true"<br>><br> <header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0;<br>Windows NT 5.1; Hotbar 3.0)" />
<br> <!-- List of User-Agents:<br><a href="http://www.user-agents.org/index.shtml?moz">http://www.user-agents.org/index.shtml?moz</a> --><br> <header name="accept-encoding" value="gzip,deflate" />
<br></config><br><br><br>The webtest log yields the following:<br>[...]<br> [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1551.<br> [config] INFO (com.canoo.webtest.engine.Configuration
) - Using<br>browser version (Microsoft Internet Explorer, 4.0 (compatible; MSIE<br>6.0b; Windows 98), Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;<br>Hotbar 3.0), 1.2, 6.0). If the javascript support is not as expected,
<br>then it's time to go into the sources<br> [config] INFO (com.canoo.webtest.engine.Configuration) -<br>Configuring 2 HTTP header field(s)<br> [config] INFO (com.canoo.webtest.engine.Configuration) - Skipped
<br>User-Agent header as it has already been configured in the<br>BrowserVersion<br> [config] INFO (com.canoo.webtest.engine.Configuration) -<br>Configured header "accept-encoding": gzip,deflate<br>[...]<br>
<br>The access log on the web server says that the User-Agent field in the<br>HTTP header is "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;<br>Hotbar 3.0)" for all requests the tests executed generate, which is
<br>correct according to what I declared in my <config> section.<br><br>The issues I'm pointing at here is the strange logging information<br>WebTest yields in the console. The logging information WebTest yields
<br>is very confusing and doesn't really tell what's going on. I really<br>miss some good documentation concerning how to simulate different<br>kinds of browser during tests, how to do this in a proper way etc.<br>
<br>If anyone has some experience with this, please to not hesitate to<br>reply on this post. I also believe the project team developing and<br>documenting WebTest should develop some additional documentation on<br>this topic and refactor the WebTest code in order to define less
<br>confusing log entries. I know that WebTest uses HtmlUnit in order to<br>simulate browsers, but I still believe these issues are within the<br>scope of their work.<br><br>Kind regards,<br>Rune<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_5869_1964540.1199968338123--