Simulating Various Mobile Browsers

One of the simplest way to simulate various handset/browser combinations is the “User Agent Switcher” plug-in for the Mozilla Firefox browser. It allows you to fake whatever UA in the requests.
User Agent Switcher plug-in 

To install the plug-in, search for “User Agent Switcher” under “Tools->Add-ons” in Firefox.

Of course, this is the cart before the horse since you would need to know the UA of the handsets before populating this tool. There are several means to do this: (a) use the handset browser to hit sites such as and (b) write a simple PHP script to log down (or capture) the HTTP headers – and just look for the header “User-Agent”.

If you’re just starting up and need to start a collection of UAs, there are several sites to start with: (a) (b) (c) (d) or WURFL is probably one of the most useful resource for device information including UA strings.

If you only need to test for redirects based on UA string eg. iPhone and Android browsers redirect to a Javascript capable site, some good options would be to use Perl, Python or JMeter (with some BeanShell scripts) to read in a list of UAs to hit the source URL and check for the target URL.

Most of the time, we have to test for page rendering and functional requirements. To perform both, the ideal would be to use an actual handset. However, this can be extremely time consuming (even HSDPA speeds do not match WiFi speeds and handset processors can also be slow) although it gives a good feel for the actual user experience; also, there’s always a shortage of test handsets to go around – hence it makes sense to simulate the device browser. This will be covered in the subsequent posts.

Leave a comment

Filed under Mobile Web, QA, Testing

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s