Appium is an open-source tool for automating native, hybrid, and mobile web applications on iOS, Android, and Windows platforms.
It uses the WebDriver protocol, similar to Selenium, and allows you to write tests in any language: Java, Python, JavaScript, C#, Ruby, etc.
ā Cross-platform: Write once, run on Android and iOS
ā Language-agnostic: Supports Java, Python, JavaScript, and more
ā No app modification required: Test real apps without changing code
ā Native, hybrid & web testing in one framework
ā
Integrates with CI/CD pipelines and cloud platforms (BrowserStack, Sauce Labs, etc.)
š± Native (built with iOS/Android SDKs)
š Mobile Web (accessed in a browser on the device)
š Hybrid (e.g., Ionic, React Native)
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.*;
import java.net.URL;
public class AppiumSampleTest {
Ā Ā Ā Ā private AndroidDriver<MobileElement> driver;
Ā Ā Ā Ā @BeforeClass
Ā Ā Ā Ā public void setup() throws Exception {
Ā Ā Ā Ā Ā Ā Ā Ā DesiredCapabilities caps = new DesiredCapabilities();
Ā Ā Ā Ā Ā Ā Ā Ā caps.setCapability("platformName", "Android");
Ā Ā Ā Ā Ā Ā Ā Ā caps.setCapability("deviceName", "emulator-5554");
Ā Ā Ā Ā Ā Ā Ā Ā caps.setCapability("app", "/path/to/app.apk");
Ā Ā Ā Ā Ā Ā Ā Ā driver = new AndroidDriver<>(new URL("http://localhost:4723/wd/hub"), caps);
Ā Ā Ā Ā }
Ā Ā Ā Ā @Test
Ā Ā Ā Ā public void loginTest() {
Ā Ā Ā Ā Ā Ā Ā Ā driver.findElementById("com.example:id/username").sendKeys("admin");
Ā Ā Ā Ā Ā Ā Ā Ā driver.findElementById("com.example:id/password").sendKeys("password");
Ā Ā Ā Ā Ā Ā Ā Ā driver.findElementById("com.example:id/loginBtn").click();
Ā Ā Ā Ā }
Ā Ā Ā Ā @AfterClass
Ā Ā Ā Ā public void tearDown() {
Ā Ā Ā Ā Ā Ā Ā Ā driver.quit();
Ā Ā Ā Ā }
}
Appium Server: Installed via npm (npm install -g appium)
Android Studio: With emulators & SDK
Java & Maven/TestNG/JUnit
Appium Inspector (optional): For element inspection
Real device or emulator/simulator
Test login/signup flows in a native app
Validate form submission and navigation
Automate smoke tests in mobile CI pipelines
Perform cross-device compatibility tests
Use Appium + Cucumber for BDD mobile testing
š Appium Official Docs
You can explore and extend Appium mobile automation using this framework:
š¦ Repo:
š K11TechLab Cucumber BDD Java Full Stack Framework
ā What's Included:
ā Appium support for Android & iOS
ā Clean Page Object Model for mobile screen interactions
ā Cucumber BDD integration with Gherkin steps
ā Platform-specific driver setup (-Dplatform=android | ios)
ā Flexible config support (env, browser, deviceName)
ā Easy CLI execution & CI integration support
š Need Help Getting Started?
Reach out or raise an issue on GitHub ā or contribute by adding new examples!
Happy Testing! š