Testing Mobile Pages in Device Emulators


Introduction:

In this article we will see how to test mobile web pages in Device Emulators that are provided by default with Visual Studio.

Background:

Before going to this article topic just go through How To Create Mobile Web Pages   tempuri.org. After creating our mobile pages now we have to test our pages. You can test your mobile pages in a desktop browser also just as you do for testing normal web pages but testing mobile pages in desktop browsers is not a good practice so here we will see how to test mobile web pages in device emulators.

Prerequiesite:

For testing mobile web pages in device emulators you have to use the following steps.

  1. How To Create Mobile Web Pages.
  2. Hosting Website.
  3. Download ActiveSynch

After reading the above two articles you will have a clear idea of how to create a mobile website and how to host it under IIS. The reason for hosting website under IIS is because testing of mobile pages in device emulators is not possible without hosting.
To the task:

Now we will see how to test our mobile pages in device emulators; for that follow the following steps.
  1. Create your mobile application.
     
  2. Host your mobile application.
     
  3. Download ActiveSynch and install it in your system. While installing close all instances of Visual Studio running on your system. This is one of the usefull software for connecting device emulators.
     
  4. You have to configure this active asynch also. Open your activesynch from the system tray and match the setting to the given screen.

    TestMobile1.gif
     
  5. Now open the Device Emulator Manager from the location:

    C:\Program Files\Microsoft Device Emulator\1.0

    Which will show screen like below.

    TestMobile2.gif
     
  6. Select Device from the list and right click and say connect which will open Device Emulator. If you are opening it for the first time then it will take some time. See the screen below.

    TestMobile3.gif
     
  7. After doing so in Device Emulator manager which will show connected devices, again right-click on a connected device and select the Cradle option which will automatically open ActiveSynch like below.

    TestMobile4.gif
     
  8. After this it will ask you for the Parteneship select Guest Partenership from the option and say next. ActiveSynch will show connected; now close activesynch. See bellow image.

    TestMobile5.gif

    TestMobile6.gif
     
  9. Now go to Deveice Emulator in start->Internet Explorer and type the URL; here it will not accept localhost; provide the IP address of your system.

    Ex. http://192.168.100.116/Mobile/frmhome.aspx.

    See the below screen.

    TestMobile7.gif

Conclusion:

In this way we can develop our mobile website and test it in mobile emulators.
 


Similar Articles