Appium Introduction and Complete Setup Guide for Mobile Automation Testing
This article introduces Appium, an open‑source cross‑platform mobile automation tool, and provides a step‑by‑step guide to set up the Android development environment, install the Appium server (both CLI and desktop), and configure Python with the Appium‑Python client, including necessary code snippets.
Appium is an open‑source cross‑platform automation testing tool that supports native, web and hybrid mobile applications on Android and iOS.
It implements the Selenium 3.0 draft and Mobile JSON Wire Protocol, allowing test scripts to drive apps to perform actions such as swipe, click, install, and uninstall.
The automation testing environment consists of three parts: the Android development environment, the Appium server, and the Python development environment with the Appium‑Python client.
1. Android development environment
Install the Java JDK (e.g., JDK 8) from https://www.oracle.com/java/technologies/javase-jdk8-downloads.html , then install the Android SDK from http://tools.android-studio.org/index.php/sdk and set the environment variables, for example:
export ANDROID_HOME=/***/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-toolsConnect a device or emulator and verify with adb devices .
2. Appium server
Install Node.js from https://nodejs.org/en/download/ , then install Appium globally via npm:
npm install -g appiumOptionally configure a domestic npm registry:
npm config set registry=https://registry.npm.taobao.orgInstall a specific Appium version, e.g., npm install -g [email protected] , or use the graphical client Appium Desktop, downloadable from https://github.com/appium/appium-desktop/releases/ .
3. Python development environment and Appium‑Python client
Download and install Python from https://www.python.org/downloads/ , then install the client library:
pip install Appium-Python-ClientFor a specific version using a Chinese mirror:
pip install Appium-Python-Client==0.28 --trusted-host pypi.douban.com -i http://pypi.douban.com/simple --userAfter installation, a simple automation script can be run to verify the setup.
360 Quality & Efficiency
360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.