Mobile App Automation Testing Using Appium

Mobile App Automation Testing Using Appium

What is Mobile Automation Testing?
Mobile Automated testing provides a mechanism to consistently repeat a test procedure and verify application results.It can be effective both for regression testing as well during development.
Testing mobile applications are different and more complex than testing traditional desktop and web applications.

Install and Uninstall Application using Command Prompt:

What is Appium?

Appium is an Open source, Cross Platform test automation tool for mobile apps
Supports automation of Native, Hybrid and Mobile Web apps
Based on Client-Server Architecture
Appium Server written in Node.js

What are Desired Capabilities?
Desired Capabilities are a set of keys and values sent to the Appium server to tell the server what kind of automation session we’re interested in starting up.

In Desired Capabilities, We have to provide “BROWSER_NAME” (Only in case of we have to automate test cases of Mobile Web else in case of app automation we have to keep this section blank), “VERSION” Android version of your mobile device, “devicename” as ANDROID and “platformName” as ANDROID. Instead of all the above we have to provide package name and activity name of the application (Steps to find Activity Name & Package name of an Android apk)

SetupMobile Device For Automation using Appium:
For setting up mobile devices, we have to verify that whether developer options enable or not.
USB Debugging is allowed or not.
For Real device, Android version must be 4.2 or above.

Step By Step Installation:-STEP 1: – Install and setup “JAVA” LinkSTEP 2: – Install and setup Android SDK LinkSTEP 3: – Restart the system (strongly recommended)STEP 4: – Setup Eclipse and Pin to Task Bar (Right Click on Eclipse.exe and set it to Pin to Taskbar)STEP 5: – Launch Eclipse and create a new projectSTEP 6: – Check android is installed on your system or not. Open command prompt & type adb on command promptSTEP 7: – Check Connected Device adb devicesSTEP 8: – Install Device PC SuiteSTEP 9: – Enable Developer Option and allow USB DebuggingStep 10: – After completing all these steps, just type adb devices on command promptStep 11:-adb install D:\Mobile_Setup\apk\Teamchat.apk
It will install the application on the connected device with a Success message.Step 12: – Download & Install Appium LinkStep 13: – Install Appium by clicking on Appium.exe & Launch AppiumStep 14: –Setup is complete and now we have to start the Mobile Automation.
Attach your Mobile Device with your system using adb devices command and verify that device is attached to the system.
Start Eclipse and create a new program for mobile device automation.
Launch Appium.
After launching Appium Run the Script.Step 15: – Launch UI Automator (Available at D:\SDK\tools location)
It will help us to find out the mobile objects.