Presentation is loading. Please wait.

Presentation is loading. Please wait.

Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.

Similar presentations


Presentation on theme: "Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel."— Presentation transcript:

1 Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel

2 2 Day 8 Testing the Mobile Web with Selenium

3

4  Emulator  Real device (tethered to workstation)  Real device in a real location on a real network

5  Setup Environment: ◦ Download Android SDK ◦ Unpack ◦ Update ◦ Create Android virtual device (AVD) ◦ Start Emulator ◦ Install Selenium APK  Run the automated test ◦ Script or record using IDE ◦ Debug and convert to webdriver API ◦ Launch App ◦ Run the test

6 http://developer.android.com/sdk/index.html Note: On Linux, android SDK is distributed for 32-bits machine. If you have a 64-bit machine you will need to install ia32-libs http://developer.android.com/sdk/installing.html#troubleshooting http://developer.android.com/sdk/installing.html#troubleshooting

7  Install SDK to the default location Note: if your sdk is installed in a different folder, edit./properties.yml to reflect that location  From command prompt ◦ $ cd ~/android_sdk/tools ◦ $./android update sdk

8 ./android create avd \ -n my_android \ -t 8 \ -c 100M  -n = name for the device  -t = version and model  -c = virtual SD capacity  Also: ◦ -h --help Help on a specific command. ◦ list Lists existing targets or virtual devices.

9  In the tools folder double click “android.bat”  Click New… button  Enter information  Click Create AVD

10 emulator -avd my_android & Suggested options to speed up the boot process:./emulator -avd my_android \ -no-audio \ -no-boot-anim \ -scale.4

11  Download android-server.apk from: http://code.google.com/p/selenium/downloads/li st  Place it into easy to access location  From command prompt: cd ~/android_sdk/platform-tools/./adb -e install \ -r path_to_apk/android-server.apk

12  Set up port forwarding./adb forward tcp:8080 tcp:8080  Start the App from command line: adb -s shell am start -n \ org.openqa.selenium.android.app/ org.openqa.selenium.android.app.MainActivity

13  In the tools folder double click “android.bat”  Click the desired AVD name and …  Click Start…

14  Set up port forwarding./adb forward tcp:8080 tcp:8080  Click Apps icon  Click My Apps  Select WebDriver

15  Script a test or record a test using IDE  Debug and/or convert to WebDriver API  Set the correct driver: ◦ driver = new AndroidDriver();

16  Connect the Android device using a cable to the work station  Make sure all the required drivers are installed  From command prompt: ◦ adb devices - This will give you the serial Id of your connected device.  Install the App ◦ adb -s -e install -r android-server.apk  Setup port forwarding ◦ adb -s forward tcp:8080 tcp:8080  Run the automated test


Download ppt "Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel."

Similar presentations


Ads by Google