Mobile Test Automation: Appium with Python Client



Appium is an open source tool for mobile test automation, you can automate functional test cases for Android and iOS application. As in my some previous posts, I explained Calabash and I just used Ruby for writing test cases because Calabash only supports Ruby and as I know they have plan to support Java. However Appium doesn't have this language constriction. Since it uses Webdriver, it supports the languages which are supported by Webdriver. It means that Java, Objective-C, PHP, Python, C#, Clojure, Perl, JavaScript with Node.js and plus Ruby are supported. You just install the language client you want to test and then write your test cases. Check for the client for your favourite languages from Appium page.

Install Appium:
npm install -g appium

Install Appium Client:
npm install wd

Install Python Appium Client:
pip install Appium-Python-Client

Ensure that you have Python installed, recommend to have 2.7 or above:
python --version

Ensure that you have virtual or real devices for Android
adb -d devices

Run Appium
appium &

For iOS Testing

Download the application from Google developer page and then run it in Xcode. Then you need to set the path, it should look like:
~/Library/Developer/Xcode/DerivedData/GooglePlusSample-fxjpokrypvmgvlgetxqntrndhvhu/Build/Products/Debug-iphonesimulator/GooglePlusPlatformSample.app




For Android Testing

Download the sampleAndroidProjectToAutomate.apk file from github. Create a android virtual device you can use Android AVD or Genymotion. Then set the app path, it should look like: 
'<path-to-project>/mobile_automation/calabash_android_automation/sampleAndroidProjectToAutomate.apk'




Comments

  1. Thanks for a great information in your blog. I have read all the post of your blog. Great work on Appium.
    http://thecreatingexperts.com/appium-training-in-chennai/

    ReplyDelete

Post a Comment

Popular posts from this blog

Selenium Error "Element is not currently interactable and may not be manipulated"

Change Default Timeout and Wait Time of Capybara

Performance Testing on CI: Locust is running on Jenkins

Selenium Chromedriver Error Message: u'unknown error: unable to discover open pages

Getting the text of elements in Espresso