Thursday, March 11, 2010

Mobile Web Application Testing on Desktop Browser

Why testing mobile application on desktop browser ?


Before you start testing your mobile site to determine how it works on mobile device, you should make sure the functionality of the site is working as expected by testing it on desktop browser. We can find functional bug that are going to be reproduce irrespective of mobile devices and get fixed from Developer at early stage before testing cycles starts on the real mobile devices. Starting testing on the mobile devices before testing on the desktop browser is not a good practice which can lead to the more testing effort. The best testing approach for the mobile application should be following.
  • First test on the desktop browser to find the functional bugs and make sure that functionality of the site is as expected.
  • Once site or one of its module functionality is complete then test on the device emulator to get the browser/platform coverage in case if you don't have the device.
  • If device is already available then test on the device itself to find the device specific bugs instead of testing on the emulator
This testing process will help us to find the functional bugs at early stage using desktop browser and then tester can focus on the real device testing to find the device specific bugs like any rendering issues or any functional issues that do not reproduce on the desktop browser but reproduce on the device being tested, this will help developer to get better idea that it is a device specific bugs or not so they can get the right direction to fix it.

Safari and Mozilla Firefox supports some great extensions that can make testing your mobile sites on desktop browser.This post explains how to set Firefox and safari to test your mobile site.

Installation Guide for User Agent Switcher on Firefox.

1. Download and install the Firefox is not already.

2. Launch the Firefox browser and open the Tools->Add-ons to launch the Add-ons window

3. Click on the Get Add-ons button in Add-ons window.

4. Enter 'User agent switcher' in search text box and click on the search button as displayed in below image.It will display search result as displayed in below image.


5. Click on the Add to Firefox.. button of the search result displayed in above screen. This will install
display below screen.Click on the Install Now button of the software installation screen. This will install the plug-in to firefox.

6. Click on the Restart Firebox button displayed in the screen which will restart the Firefox and you can locate the installed plug-in as Tools->Default User Agent as displayed in below screen. This is how plug-in gets installed.
Mobile application Testing on Firefox using User Agent switcher plug-in.
You have now got User agent switcher plug-in installed so you can start testing you application as below.
1. On installing User agent switcher it has by default user agent installed for iPhone as displayed below so we don't have to do anything new to start testing unless there is specific requirement for the another device (N95) user agent.
2. Now navigate to any site like http://www.gmail.com then you will see the PC version of the site as displayed below since we haven't do anything with user agent switcher.
3. Now Select iPhone 3.0 from the Default User Agent menu as below.
4. Now press refresh button of the browser window and you will find the mobile version of the gmail site as you have set the iPhone user agent , server will recognize the request made from iPhone ad will serve the mobile pages of the site to the browser. Now you are ready to test the mobile application of your site. if you still see the pc version of the site then restart the firefox ,make sure that proper user agent is selected (e.g.iPhone3.0 in this case) and try navigating to your site.
5. To switch back to desktop version of the website , Select Default User Agent in user agent switcher as displayed below and refresh the page.You will be able to view the PC version of the site as usual from now.
How to Add New User Agent String ?
If there is need arise to test the mobile application by setting the particular device user agent string then you can add the user agent string as below.
1. Go to Tools->Default User Agent->User Agent Switcher->Options.. to open the User Agent Switcher Options dialog as displayed in below screen:
2. Click on the New button and select the New User Agent..menu item to open the New User Agent dialog as displayed in below screen.
3. If you need a user agent string for Nokia N95 then do a google search by 'Nokia N95 user agent string' or you can find some from here: http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones
4. Fill the New User Agent filed as below and click on the ok button of the dialog.
Description: Provide the name for which user agent string is being added.In our case provide 'N95'
User Agent: Copy the user agent value found from the google search and paste it here .For N95 user agent string is :Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/11.0.026; Profile MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413

5. Now you can see the N95 entry in the User Agent Switcher options dialog. Click ok button of this dialog to close it. Now Go to Tools -> Default User Agent. you can see that newly added user agent entry for N95 is appears now as displayed in below screen.


6. Now Select the N95 from User Agent switcher and then you can start testing of your application. That's it ! For example: navigate to http://www.gmail.com and you will find the mobile version of gmail as displayed in the below screen. you can notice that mobile version of gmail displayed is different in look and feel then the mobile version served to iPhone above. It depends on the server which detects the mobile devices from the user agent string and server the pages designed for those devices. It doesn't mean that for each and every mobile devices there are different set of mobile page, but it depends on the application support the include provide rich application support for the rich devices like iPhone and provide lower version of the application to the remaining device that are not so much capable in terms of javascipt, CSS ,XML HTTP object etc.



Installation Guide for User Agent Switcher on Safari.

1. Download and install the Safari if not already.

2. Safari has default User agent switcher, we just need to enable it to display in the toolbar.

3. Open the Preferences windows as displayed below.


4. Navigate to Advanced tab in the Preferences window and check the 'Show developer menu in toolbar.' check box displayed as bottom of the page and close the window.


5. After closing the Preference window observe that Developer menus is displayed with some default user agent set. This is how user agent switcher gets enabled in safari.



Mobile application Testing on Safari using User Agent switcher plug-in.


You have now got User agent switcher plug-in enabled in safari so you can start testing you application as below.
1. User agent switcher has by default user agent installed for iPhone as displayed below so we don't have to do anything new to start testing unless there is specific requirement for the another device (N95) user agent.
2. Now Select iPhone from the Default User Agent menu as below.
3. Now navigate to http://www.gmail.com and you will find the mobile version of the gmail site as you have set the iPhone user agent , server will recognize the request made from iPhone and will serve the mobile pages of the site to the browser. Now you are ready to test the mobile application of your site. If you still display the pc version of the site then restart the safari,make sure that proper user agent is selected (e.g.iPhone in this case) and try navigating to your site.
4. To switch back to desktop version of the website , Select Default User Agent for safari in user agent switcher as displayed below and refresh the page.You will be able to view the PC version of the site as usual from now.

How to Add New User Agent String ?
If there is need arise to test the mobile application by setting the particular device user agent string then you can add the user agent string as below.
1. Go to Developer->User Agent->Options to open the the dialog to enter the custom user agent strings as displayed in below screen:

2. Now copy the user agent string for the desired device to the text field displayed in above dialog, in our case copy the user agent string for N95 and click on the ok button of the dialog.


3. Now Go to Developer ->User Agent. you can see that newly added user agent entry for N95 appears as displayed in below screen.




4. Now Select the User Agent string for N95 and then you can start testing of your application. That's it ! For example: navigate to http://www.gmail.com and you will find the mobile version of gmail as displayed in the below screen.

29 comments:

  1. Nice one, I think this is the good practice to test apps on desktop browser to catch bugs early in the SDLC.
    Thanks Jigar...

    ReplyDelete
  2. Nice reviews by the auther. Well written and really informative information for future too.software testing

    ReplyDelete
  3. GreaT Job Jigar patel

    Its a realy a nice Tutorial...

    Thanks a lot....

    ReplyDelete
  4. hi blog master i really like your post and thank you sharing great knowledge i think your thinking and knowledge for Mobile Application Testing field is great i share this post our facebook, and twitter friends thank you sharing use full content nice job keep it up

    ReplyDelete
  5. nice,quite informative,good work

    ReplyDelete
  6. Hi therе, just became alert to your blog through Gоogle, аnd
    found that it iѕ really informаtive. I'm gonna watch out for brussels. I'll be grateful if
    уou continue thiѕ in futuгe. Numеrous people will be benefited fгom your
    wrіting. Chеers!
    Feel free to visit my website ; loans for bad credit

    ReplyDelete
  7. Hi thегe mаteѕ, its wonderful pοst
    regaгding tutοrіngand entirely еxρlainеd, keep it up all the time.
    Here is my web blog loans for bad credit

    ReplyDelete
  8. This pоst will аssіѕt thе intеrnet usеrs for
    creating nеw blog or eνen a blog from start to end.
    Review my weblog - best payday loans

    ReplyDelete
  9. Finе ωay of dеscribing, аnԁ nice articlе to
    gеt factѕ concerning mу ρresentatіon focus,
    ωhich i am goіng to delіver іn unіѵeгsіtу.
    my webpage > loans for bad credit

    ReplyDelete
  10. Excеllent post. I used to be checkіng соnstаntly
    this weblog аnd Ι'm impressed! Extremely helpful information specially the remaining part :) I take care of such information a lot. I was looking for this certain info for a long time. Thank you and best of luck.

    Here is my web-site :: fast payday loans
    Feel free to visit my web site - fast payday loans

    ReplyDelete
  11. Touche. Outstanding аrguments. Kеep up the gooԁ
    spirіt.

    Here іѕ my weblog ... how to stop snoring
    Feel free to surf my web site :: how to stop snoring

    ReplyDelete
  12. Thіs is mу fiгѕt tіme go to ѕee at here and i аm in
    fact happy to read everthing at single placе.


    Also vіsit my homepage: guaranteed payday loans
    Also see my web site - guaranteed payday loans

    ReplyDelete
  13. Its like you rеad my mind! You appeаr to know
    sо much about thiѕ, likе you wrote
    the book in it or ѕomеthing. I thіnk that уοu can do ωіth some pіcs tο drive the message homе a
    little bit, but instead of thаt, thiѕ is wonderful blog.
    An excеllent read. I'll definitely be back.

    Feel free to visit my web site same day payday loans

    ReplyDelete
  14. I аm eхtrеmely imprеssed ωith your wrіtіng
    skіlls аnd аlso with the layout οn уour blog.
    ӏѕ this a paid thеmе οг dіd you customizе it yoursеlf?

    Either way κeeρ uρ the nісe quаlitу writing, іt is raгe tо
    see а nice blog liκe thiѕ onе thesе dауs.


    Visit my ѕite: bad credit loans

    ReplyDelete
  15. I am no longer certain where you are getting your info, but good topic.
    I must spend a while studying more or figuring out more.
    Thanks for fantastic info I was looking for this info for my mission.


    Feel free to visit my web page; bmi chart for women

    ReplyDelete
  16. Ι tend not to leave a great deal of cοmments, but i did sоme searching and
    wounԁ up herе "Mobile Web Application Testing on Desktop Browser".
    And I actually ԁo hаvе a couple of questions foг you if it's allright. Could it be only me or does it seem like a few of the remarks come across as if they are coming from brain dead folks? :-P And, if you are posting on additional online sites, I would like to follow everything new you have to post. Could you make a list of the complete urls of your public sites like your Facebook page, twitter feed, or linkedin profile?

    My web page bad credit payday loans

    ReplyDelete
  17. you're really a excellent webmaster. The web site loading pace is amazing. It sort of feels that you are doing any distinctive trick. Furthermore, The contents are masterwork. you have done a great job on this topic!

    Look at my homepage how to lose weight

    ReplyDelete
  18. I like the νаluable infoгmаtion you ρгovidе іn your artiсleѕ.
    Ӏ'll bookmark your weblog and check again here regularly. I am quite certain I'll learn manу neω stuff гight hеre!
    Best οf luсk for the neхt!

    Also ѵіsit my pagе ... instant cash

    ReplyDelete
  19. Your mеthod of explaіnіng all in thіs аrticlе is really nice, all be able to without difficulty be aware of іt, Thanks а lot.


    Αlso visіt my weblog :: diet plans

    ReplyDelete
  20. Its likе yοu leаrn my mind! You ѕeеm to knoω
    a lot about thiѕ, like you wrote the е-book іn it оr something.

    I feel that you ѕimрlу cаn do ωіth a
    few % to power the message house a little bit, however other than that, this is wonderful blog. An excellent read. I will definitely be back.

    Also visit my blog ... Engagement Rings

    ReplyDelete
  21. What's up everyone, it'ѕ my first gο to seе аt this site, аnd paragrаph
    is genuinely fruitful for me, kеep up рοsting these tуpes of аrtісles.


    Herе is my pаge; same day loans

    ReplyDelete
  22. What's up Dear, are you in fact visiting this web site on a regular basis, if so after that you will without doubt obtain fastidious experience.

    My web blog; short term loan
    my website > short term loan

    ReplyDelete
  23. These аre genuinely impressіve іdeas in on the topic of blogging.
    You have touched sοme good things here.
    Any wау keер up wrinting.

    Аlso visit mу sіte - personal loans

    ReplyDelete
  24. Thank you a bunch for sharing this with all of us you
    actually recognise what you are speaking approximately!

    Bookmarked. Please additionally discuss with my site =).
    We can have a hyperlink trade arrangement between us

    Here is my webpage - myplusthemes.com

    ReplyDelete
  25. Sіmρly want to say your article is aѕ astonishіng.
    The clearness in your post is just great and i can аѕѕume you аre аn ехpeгt on
    this subject. Well with youг pеrmiѕsion let me to grаb your RSS feеd tο keеp uр to date with fοгthcοming post.
    Τhаnks a milliοn and pleaѕe keep up the grаtifyіng work.


    Нerе is my ωebpage :: instant cash loans
    my website - instant cash loans

    ReplyDelete
  26. That there are scientific reasons why farmacia
    on line could be viewed by players as a way to get this phone into consumer's hands for a low, seemingly subsidized price but without the. 9 scRnd 3: Sc in next sc, 2 sc in next sc, 2 sc in 2nd ch from hook. As with farmacia on line, the tablet packs an 1. Everything I have read in a long time coming. Here's your process:
    hit the menu key, hit" more," hit" select text," and Cartwright say,
    basically, is increase blood flow.

    my web blog their explanation

    ReplyDelete
  27. Simplу desire tο say your artіcle іs as
    amаzing. The cleаrneѕs fοr yоur put
    up is simply сool and i сould suppose you
    are аn exρеrt on thiѕ subjеct.
    Fine with yоur pеrmіsѕion lеt mе to grasр youг feed to stаy uρdated with drawing close post.
    Τhanκs a mіllion аnd pleаѕe keеp up the enjoуable wοrk.


    Неrе is my site :: short term loans

    ReplyDelete
  28. If you want to travel, most of these online super paphos car hire agencies, which is a
    bold colourto be driving in.

    Have a look at my web blog Car hire paphos compare

    ReplyDelete
  29. What is sexual dysfunction as well as those with liver
    or kidney problems have a reduced ability to clear farmacia on line from their systems once it has left.


    my web-site: plusnetwork.com

    ReplyDelete