Command Line Option Not Correctly Setting User Agent

How to apply eValid to functional testing of web applications.

Command Line Option Not Correctly Setting User Agent

Postby DaveM » Wed Feb 18, 2009 1:00 pm

The -AGENT command line option doesn't seem to be setting the user agent
string correctly for us.

For example, the following command was run against one of our message
board sites at 1:47PM this afternoon:

C:\Program Files (x86)\Software Research\eValid\Program\evalidP.exe -B
"C:\evalidmonitor\evalid_scripts\4eb936712fb64988ad0c0f6e8b34de8c\tmpim_
crv.evs" -S -LOG E -FE
"C:\evalidmonitor\evalid_logs\4eb936712fb64988ad0c0f6e8b34de8c\20090216\
20090216.134740-event.log" -FS
"C:\evalidmonitor\evalid_logs\4eb936712fb64988ad0c0f6e8b34de8c\20090216\
20090216.134740-summary.html" -PL 3 -AGENT "WebMDBrowser" -RT 50000 -CK
-CC Y

The "-AGENT" option is supplied, so this should have set the user agent
string to "WebMDBrowser"

However, here is how the request was recorded on the web server:

2009-02-16 13:47:46 208.93.169.2 - WebMD - 10.250.14.76 80 GET /
14@@.5987f47a 200 107261 105 HTTP/1.1 boards.webmd.com
Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.2;WOW64;SV1)
VisitorId=0a983110-2912-4461-8a8f-ef8493f8460e;adCounterCookie=9;R1=7;C5
213_2008039_pop_cookie=True

I've tried this locally on my workstation and got the same result -
useragent was set to "WebMDBrowser" but the recorded agent string was
IE's default ("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
3.0.04506.30; .NET CLR 3.0.04506.648; MS-RTC LM 8)")

Any ideas as to what would be causing this behavior?
DaveM
 
Posts: 1
Joined: Wed Feb 18, 2009 12:45 pm

Re: Command Line Option Not Correctly Setting User Agent

Postby functionaltesting » Wed Feb 18, 2009 1:04 pm

Here are key pages to look at about this:

* Here is an illustration of how effective eValid's SetUserAgent string
can be in testing applications that involve multiple browser types:

http://www.e-Valid.com/Products/Documentation.9/UserAgent/illustration.html

* eValid has a command that can be used to set the user agent string to
any value. This command makes it possible to cause eValid to report to
a server that it is ANY kind of browser, a feature that is useful for
validation of web applications beyond the IE context that eValid supports:

http://www.e-Valid.com/Products/Documentation.9/Technical/script.html#SetUserAgent

* This page shows key facts about the user agent string:

http://www.useragentstring.com

That page gives illustrations of various appropriate values for this
string.

In your case I think that the format is wrong (by comparing with the
values shows from that page. Maybe you want to use a string of
this format:

"Mozilla/4.0 (compatible; MSIE 7.0; WebMDBrowser)"

We know that all of the standard alternative names for browsers
work, but it is likely that if you use just "WebMDBrowser" alone the
server thinks you've made a mistake and reverts to the string value
it most recently used.

Hope this is helpful...
eValid Tech Support Team
functionaltesting
 
Posts: 116
Joined: Tue Jan 01, 2008 12:48 pm


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons