Oct 28, 2025
Kickstarting Mobile Automation with Appium
Master Appium automation for Android and iOS by building cross-platform mobile tests from setup to execution, and easily scale your app testing.
Author


Book a call
Table of Contents
- What Appium is and how it works
- Setting up your automation environment
- Running your first test on the emulator and real devices
- Common issues and how to fix them
What is Appium?
Why Appium?
- No need to recompile or modify the app under test
- Supports Java, Python, JavaScript, Ruby, and more
- Works across Android and iOS platforms
- Completely free and actively maintained
Understanding Appium Architecture
1. Appium Client
2. Appium Server
3. Automation Engines
- UIAutomator2 / Espresso (Android) – Executes commands on Android devices
- XCUITest (iOS) – Executes commands on an iOS device
4. Mobile Device (Emulator, Simulator, or Real Device)
5. Platform-Specific Bootstrap Components
How Appium Executes a Test Command
- Command Sent: Your test script (client) sends a command using WebDriver over HTTP (e.g., “Tap the Login button”).
- Server Processes: The Appium Server receives and parses the command, checks the desired capabilities to identify the platform.
- Routing to Engine: Based on the platform (Android/iOS), the server forwards the command to the correct automation engine.
- Interaction with Device: The engine acts as the app via the connected device or emulator.
- Response Returned: The result (success/failure) travels back through the engine and server to the test script.
Prerequisites Before You Begin
Required Tools:
- Java JDK (11 or higher)
- Node.js & npm
- Android Studio (for SDKs, emulator, platform tools)
- Appium CLI
- Appium Inspector
- Code Editor or IDE (e.g., IntelliJ, VS Code)
Programming Language Setup
Setting Up Your Automation Environment
1. Install Node.js & NPM
2. Install Appium CLI Globally
3. Verify Setup with Appium Doctor
4. Install Appium Inspector

5. Set Environment Variables
Android Studio & Emulator Setup
1. Install Android Studio
- Download from: https://developer.android.com/studio
2. Set Up SDK Tools
- Open Android Studio → SDK Manager
- Install: SDK Tools, Platform Tools, and Build Tools
3. Create and Launch an Emulator

2. Under Device Manager, click on the plus icon to create a new virtual machine.

3. Select the device configuration from the list of virtual devices and click on “Next”.

4. Complete the configuration process by selecting the operating Android version.

5. Update the name of the virtual device and click on “Finish”.

6. And you are almost done:


Getting Started with ADB (Android Debug Bridge)
Common ADB Commands:
Command to find App Package and App Activity:
Make sure the app is in a running state in the emulator/physical device.
Writing Your First Appium Test on Emulator
1. Define Desired Capabilities (JAVA):
Desired Capabilities for Appium Inspector to Inspect Mobile Elements:

2. Sample Test Code: Launching Emulator Chrome Browser
3. POM.XML File
Running the Same Test on a Real Device
1. Prepare Your Device:
- Enable Developer Options and USB Debugging
- Connect via USB and authorize debugging.
- The above code needs Appium version 2.19.0
2. Update Desired Capabilities:
Your test should now run on the physical device.
Troubleshooting Common Issues
| Issue | Fix |
|---|---|
| Emulator not detected | Restart the emulator, check the adb devices |
| Appium server error | Restart the server, validate capabilities, and check the Java Client compatibility. |
| APK not installing | Check the path, permissions, or compatibility |
| Environment variable errors | Verify ANDROID_HOME, JAVA_HOME, and add to PATH |
Conclusion & What’s Next
Congratulations! You have just automated your first mobile test with Appium on both an emulator and a real device. In this journey, you’ve set up the environment, learned about ADB, and interacted with elements programmatically.
Subscribe to Our Newsletter
Subscribe to RSS
Press & Media Hub RSS FeedRelated Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Jun 27, 2026
Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability

Jun 19, 2026
We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned

Jun 12, 2026
Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions

Jun 8, 2026
Geeklego: The Open-Source Design System Built to Work With AI

May 18, 2026
Your Vibe Code Has No Memory. DESIGN.md Fixes That.

May 14, 2026