{"id":13337269,"url":"https://github.com/yazidisme/setup-appium-testng","last_synced_at":"2026-05-18T03:10:57.094Z","repository":{"id":105069420,"uuid":"209998704","full_name":"yazidisme/setup-appium-testng","owner":"yazidisme","description":"Setup Android Test Automation using Appium and TestNG with Java Language in MacOS","archived":false,"fork":false,"pushed_at":"2022-11-01T03:27:24.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T01:47:03.413Z","etag":null,"topics":["android","appium","macos","test-automation","testng"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yazidisme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-21T14:24:58.000Z","updated_at":"2023-03-05T09:09:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae288d9a-6945-486a-a08d-a52d320c5b60","html_url":"https://github.com/yazidisme/setup-appium-testng","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yazidisme/setup-appium-testng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazidisme%2Fsetup-appium-testng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazidisme%2Fsetup-appium-testng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazidisme%2Fsetup-appium-testng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazidisme%2Fsetup-appium-testng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yazidisme","download_url":"https://codeload.github.com/yazidisme/setup-appium-testng/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazidisme%2Fsetup-appium-testng/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","appium","macos","test-automation","testng"],"created_at":"2024-07-29T19:13:43.161Z","updated_at":"2026-05-18T03:10:57.080Z","avatar_url":"https://github.com/yazidisme.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Setup Android Test Automation using **Appium** and **TestNG** with Java Language in MacOS\n\n#### 1. Java Development Kit (JDK)\n* [Download](https://www.oracle.com/technetwork/java/javase/downloads/index.html) and [install](https://docs.oracle.com/javase/10/install/installation-jdk-and-jre-macos.htm#JSJIG-GUID-F575EB4A-70D3-4AB4-A20E-DBE95171AB5F) *JDK*\n* Type `java -version` in your *Terminal* to verify installation and find out your *java version*\n* See the output of *[java version](https://prnt.sc/p8zd7s)*\n\n#### 2. Android Studio\n* Download and install *[Android Studio](https://developer.android.com/studio)*\n* Create android emulator using *[AVD Manager](https://developer.android.com/studio/run/managing-avds#createavd)*\n* [Run and stop](https://developer.android.com/studio/run/managing-avds#emulator) your emulator\n* See [android emulator sample](https://prnt.sc/p8zeq8)\n\n#### 3. Homebrew\n* Install *[Homebrew](https://brew.sh/)* using *Terminal* and enter the following command\n    ```sh\n    $ /usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n    ```\n* Follow the instructions until *Homebrew* installing success\n* Type `brew --version` to find out your *homebrew version*\n* See the output of *[homebrew version](https://prnt.sc/p8zgxb)*\n\n#### 4. Node.js\n* Install *[node.js](https://nodejs.org/)* using *brew*, type `brew install node` in your *Terminal*\n* Wait until *node.js* installing success\n* Type `node --version` to find out your *node version*\n* Type `npm --version` to find out your *npm version*\n* See the output of *[node and npm version](https://prnt.sc/p8zkyz)*\n\n#### 5. Setting the system variables\n* Create and open your *.zshrc* using *Terminal*\n    ```sh\n    $ cd ~/\n    $ touch .zshrc\n    $ open -e .zshrc\n    ```\n* Set the *Java* and *Android SDK* paths in *zshrc* file\n    ```\n    export JAVA_HOME=/Library/Java/JavaVirtualMachines/JDK_VERSION_FOLDER/Contents/Home\n    export ANDROID_HOME=/Users/SOME_FOLDERS/Library/Android/sdk\n    export PATH=$PATH:$ANDROID_HOME/tools\n    export PATH=$PATH:$ANDROID_HOME/tools/bin\n    export PATH=$PATH/:$ANDROID_HOME/platform-tools\n    export PATH=$PATH:$JAVA_HOME/bin\n    ```\n* Save and exit your *.zshrc*\n* Run emulator or connecting your real device\n* Type `adb devices` in *Terminal* to find out name and connection of your devices\n* See the output of [list of devices](https://prnt.sc/p8sfi7)\n\n#### 6. Appium\n* Install *[Appium](http://appium.io/)* with *npm* in your *Terminal* using the following command\n    ```sh\n    $ npm install -g appium\n    ```\n* To ensure that we are ready to use *Appium*, you can run the following command\n    ```sh\n    $ appium-doctor\n    ```\n* Minimum requirements for android testing from appium-doctor\n    * HOME is set to: /Users/**some_folders** ✔ \n    * ANDROID_HOME is set to: /Users/**some_folders**/Library/Android/sdk ✔ \n    * JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/**jdk_version_folder**/Contents/Home ✔\n    * adb exists at: /Users/**some_folders**/Library/Android/sdk/platform-tools/adb ✔\n    * android exists at: /Users/**some_folders**/Library/Android/sdk/tools/android ✔\n    * emulator exists at: /Users/**some_folders**/Library/Android/sdk/tools/emulator ✔\n    * Bin directory of $JAVA_HOME is set ✔ \n\n#### 7. JAR files\n* Download *[Selenium](https://www.seleniumhq.org/)* library\n    * Go to *[Selenium Standalone Server](https://prnt.sc/p8o4a3)* section\n    * Go to *[Selenium Client and Webdriver Language Bindings](https://prnt.sc/p8o509)* section\n* Download *[Appium Java Client](https://github.com/appium/java-client)*\n    * Go to [releases](https://prnt.sc/p8o7kk) menu\n    * Download [new version](https://prnt.sc/p8o7xw) of *Java Client*\n* Download *[Gson](https://github.com/google/gson)*\n    * Go to [releases](https://prnt.sc/p8oc4o) menu\n    * Download [new version](https://prnt.sc/p8ocfo) of *Gson*\n* Unzip all of them, then move to single folder like [this](https://prnt.sc/p8rtba)\n\n#### 8. Eclipse\n* [Download](https://www.eclipse.org/) and [install](https://www.eclipse.org/downloads/packages/installer) *Eclipse IDE* on your macOS\n* Launch the *Eclipse IDE*\n* Create a [new java project](https://www.wikihow.com/Create-a-New-Java-Project-in-Eclipse) in *Eclipse*\n* In java setting (create new project), click [libraries tab](https://prnt.sc/p930k1)\n* Add all [external jar](https://prnt.sc/p931ea) files\n    * gson.jar\n    * java-client.jar\n    * selenium-server-standalone.jar\n    * selenium-java.jar or client-combined.jar\n    * [Add to attachment](https://prnt.sc/p8rzth) selenium-java-sources.jar or client-combined-sources.jar in selenium-java.jar\n* Finish\n\n#### 9. TestNG\n* [Download](https://testng.org/doc/download.html) and install *[TestNG](https://testng.org/)* in *Eclipse IDE* plug-in section, see [install from update site](https://prnt.sc/p8s46r)\n* After success installing *TestNG*, restart your *Eclipse IDE*\n\n\n\n##### Finally...\n##### We are ready to write **Appium** test code\n* See the sample of [java project](https://prnt.sc/p93bpc)\n* Before execute your android tests, device must be [connected with *adb devices*](https://prnt.sc/p8sfi7) and *Appium* must be [opened in your *Terminal*](https://prnt.sc/p8smzt).\n* Find out the app package and app activity in *Terminal* using the following command\n    ```sh\n    $ adb shell \"dumpsys window windows | grep -E 'mCurrentFocus|mFocusApp'\"\n    ```\n* See the [output result](https://prnt.sc/p8stgo), there are `com.google.android.youtube` as app package and `com.google.android.apps.youtube.app.WatchWhileActivity` as app activity\n* Finding locators using `uiautomatorviewer` from *Android Studio*, type the following command in *Terminal*\n    ```sh\n    $ uiautomatorviewer\n    ```\n* See the [uiautomatorviewer](https://prnt.sc/p9435x)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazidisme%2Fsetup-appium-testng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyazidisme%2Fsetup-appium-testng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazidisme%2Fsetup-appium-testng/lists"}