Please post your Web Driver questions in official Web Driver forum

Thursday, May 28, 2015

Executing appium tests on mobile web

Back to Appium Tutorial Index

Having set up appium, lets run our first tests. But before that start the appium and android device /  emulator as following -

navigate to appium installation, which is following on my Ubuntu -
and start appium
Open another command prompt and execute -
adb devices
and you should see list of devices attached as -
List of devices attached
emulator-5554    device
If you see any error message then re-verify all the steps mentioned earlier to make sure none of the step is missed

Sample JUnit project to run tests on android emulator

  • Clone the following appium project -
  • Import project in IDEA (or your favorite IDE) and Open AndroidEmulatorWebTest class -

  • Right click on method testMobileWebOnEmulator and click Run. This would execute test on android emulator -

Sample JUnit project to run tests on android device

Use the same project but AndroidDeviceWebTest class to run test on mobile device. Of course you need to have device setup as explained in previous steps
Fork me on GitHub