osandadeshan / appium-java-mobile-automation-demo

This project serves as a boilerplate for automating both Android and iOS mobile applications using a single codebase with TestNG and the Appium library.

Home Page:https://medium.com/automationmaster/appium-mobile-app-automation-tutorial-2-527d6d78998a

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mobile Application Automation Using Appium & TestNG (For iOS & Android)

This project serves as a boilerplate for automating Android and iOS mobile applications using a single codebase with TestNG and the Appium library. It provides cross-platform support, easy setup, and comes with examples to help you quickly get started with writing and executing mobile automation tests. Feel free to clone the repository, explore the sample test scripts, and contribute to the project.

Appium Java Android Application Automation CI

Prerequisites

  1. Java
  2. Maven
  3. NodeJS

How to install the dependencies

  1. Install XCode

  2. Download and Install Android Studio

  3. Create a new system variable for ANDROID_HOME pointed to the Android SDK location

  4. Update the system path variable with ANDROID_HOME\platform-tools

  5. Install Appium 2.0

    npm i -g appium@next

  6. Install Appium Drivers

    appium driver install uiautomator2

    appium driver install xcuitest

Note: Environment Variables

image

How to run tests

  1. Using IntelliJ IDEA

    • Go to Maven Profiles
    • Select android or ios Maven Profile as the platform
    • Select dev, qa, uat, pre-prod or prod as the environment
    • Select the test classes on the src/test/java folder
    • Right-click and click on Run
  2. Using Command Line

    • To run the smoke test suite in Android against the QA environment

      mvn clean test -Pandroid,qa,smoke-test

    • To run the regression test suite in iOS against the UAT environment

      mvn clean test -Pios,uat,regression-test

Note: By default, if no Maven profiles are selected, the tests will be executed on the android platform and in the dev environment.

Tutorials

License

MIT License MIT License

Copyright

Copyright 2023 MaxSoft.

About

This project serves as a boilerplate for automating both Android and iOS mobile applications using a single codebase with TestNG and the Appium library.

https://medium.com/automationmaster/appium-mobile-app-automation-tutorial-2-527d6d78998a

License:MIT License


Languages

Language:Java 100.0%