Mobile Web Application Test Automation-II

上一篇 / 下一篇  2011-12-14 14:34:56 / 个人分类:Selenium

bykanhai.jhaverionApril 14, 2010

ReadPart 1for the introduction to the mobile web application test automation.

Mobile browsers have come a long way from being very basic browsers that displayed only static browsers to the present day advanced browsers that are virtually as equipped as the regular browsers. Mobile Websites rendering full blown content came hand in hand with the advancement in Mobile Browser Technology and the same brought in demand for high end mobile browser testing. But it was very impractical to test such stuff on hundred of handheld devices. It was the need of the hour for tools that would simulate a mobile browser type environment on the regular browser. Of course there were simulator tools, but each OEM had their own tool with limited functionalities.

There are multiple approaches to test web application

1.Actual Device
- Testing on it could be more perfect and effective, but on the other side, you must need to have large number of device lab or need subscription for this lab.
- It is also time consuming to check your test on each and every device manually.
One can perform. automation for all those device and run script. but you need subscription for those device lab for that.

2.Simulation
- In this case, you treat your browser as device and apply simulation for different phone
- This become cost-effective approach
- On the the other hand, this is simulation and not actual device, sometimes ajax, javascript. which made to work for phone will not work for browser simulation

Let’s look at simulation approach.The question is how would simulation work. How would a web browser camouflage itself to appear as a mobile browser. The answer to that isuser-agent headers/profile.

Each mobile device contains certain information which identify one phone behavior. from other. That unique information is mentioned and explained below.

1.Accept: Contains list of MIME types accepted by user agent
2.User-Agent: Contains information used to identify device and detailed information for that device. Below is example of user-agent string and each of its artifacts.

A sampleiPhoneUser Agent String and its understanding is mentioned below.

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

Mozilla                      :  It’s a Mozilla based browser
5.0                            :  The version of the browser
iPhone                      :  Apple iPhone
U                               :  Security Value. U denotes Strong Security
CPU like Mac OSX     :  Operation System iPhone OS based on Mac OS X
en                              :  Localized language for the Browser English
Apple Webkit            :  A set of core classes to display web content
420                           :  Version of the Webkit build
KHTML                     :  KHTML Engine like Gecko
Version                    :  Safari Version 3.0
Mobile                      :  Mobile Device
1A543                      :  a iPhone Firmware Version
Safari                       :  Name of the browser
419.3                        :  Browser Build

3.User-Agent Profile: User-Agent Profile is an xml document which describe device capabilities e.g screensize

All above user-agent headers and user-agent profile will change the browser behavior. to mobile behavior.

Certain tools are available which changes user-agent header/Profile and simulate a similar environment on a different browser. Such tools help a lot in multiple environment mobile testing. Bayden UA Pick, Fiddler, etc are examples of such tools.

Innext partof our article, you can find, detailed information about some simulation tools for IE and Firefox.


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar