{"id":24013247,"url":"https://github.com/cihat-kose/appium-mobile-automation-framework","last_synced_at":"2025-02-25T16:48:57.507Z","repository":{"id":246710403,"uuid":"821933622","full_name":"cihat-kose/appium-mobile-automation-framework","owner":"cihat-kose","description":"A mobile automation framework using Appium, TestNG, and Java to test mobile app functionality. Features login tests, Appium server management, and robust device handling.","archived":false,"fork":false,"pushed_at":"2025-01-03T08:27:03.000Z","size":26925,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T06:51:42.442Z","etag":null,"topics":["android-testing","appium","appium-java","automated-testing","mobile-automation","mobile-testing","page-object-model","testng"],"latest_commit_sha":null,"homepage":"","language":"Java","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/cihat-kose.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":"2024-06-29T21:06:11.000Z","updated_at":"2025-01-03T08:27:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"296ba541-8438-4756-aa15-da9fb4143248","html_url":"https://github.com/cihat-kose/appium-mobile-automation-framework","commit_stats":null,"previous_names":["chatgthb/appium_testng_mobileautomationtesting","cihat-kose/appium_testng_mobileautomationtesting","cihat-kose/appium-mobile-automation-framework"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Fappium-mobile-automation-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Fappium-mobile-automation-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Fappium-mobile-automation-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Fappium-mobile-automation-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cihat-kose","download_url":"https://codeload.github.com/cihat-kose/appium-mobile-automation-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240710059,"owners_count":19845039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-testing","appium","appium-java","automated-testing","mobile-automation","mobile-testing","page-object-model","testng"],"created_at":"2025-01-08T06:51:47.118Z","updated_at":"2025-02-25T16:48:57.481Z","avatar_url":"https://github.com/cihat-kose.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Appium Mobile Automation Framework\n\n![Appium](https://img.shields.io/badge/Appium-6DB33F?style=for-the-badge\u0026logo=appium\u0026logoColor=white)\n![Java](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=java\u0026logoColor=white)\n![TestNG](https://img.shields.io/badge/TestNG-FF7300?style=for-the-badge\u0026logo=testng\u0026logoColor=white)\n![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)\n![Maven](https://img.shields.io/badge/Maven-C71A36?style=for-the-badge\u0026logo=apache-maven\u0026logoColor=white)\n\n### 🚀 Overview\nThis project automates mobile application testing for **both Android and iOS platforms** using Appium, TestNG, and Java. The framework is designed to handle multiple platforms by switching desired capabilities and driver configurations dynamically. By modifying the driver setup in the `DriverManager` class, tests can be executed on Android devices using UiAutomator2 or on iOS devices using XCUITest.  \n\n### 📋 Table of Contents\n- [🚀 Overview](#overview)\n- [🔧 Prerequisites](#prerequisites)\n- [⚙️ Setup](#setup)\n- [📁 Project Structure](#project-structure)\n- [▶️ Running the Tests](#running-the-tests)\n- [📌 Project Details](#project-details)\n- [📝 Logging](#logging)\n- [👥 Contributors](#👥-contributors)\n- [🤝 Contributing](#contributing)\n- [📜 License](#license)\n- [📞 Contact](#contact)\n\n### 🔧 Prerequisites\n- Java Development Kit (JDK) 11 or higher\n- Apache Maven\n- Node.js and npm\n- Appium Server\n- Appium Inspector\n- Appium Doctor\n- Android SDK\n- Android Emulator or a Physical Android Device\n\n### ⚙️ Setup\n#### 1. Install JDK\n- Download and install JDK from [Oracle](https://www.oracle.com/java/technologies/javase-downloads.html).\n- Set `JAVA_HOME` environment variable.\n- **Environment Variable Setup:**\n    1. Open the command prompt and run `where java` to find the Java installation path.\n    2. Add the Java installation path to the environment variables:\n        - `Path`: `C:\\Program Files\\Java\\jdk-11\\bin`\n        - `JAVA_HOME`: `C:\\Program Files\\Java\\jdk-11`\n        - Add `%JAVA_HOME%\\bin` to the system `Path`.\n\n#### 2. Install Maven\n- Download and install Maven from [Maven](https://maven.apache.org/download.cgi).\n- Set `MAVEN_HOME` environment variable.\n\n#### 3. Install and Upgrade Node.js and Appium\n- Install Node.js from [Node.js](https://nodejs.org/).\n- Run the following commands in the command prompt:\n  ```bash\n  npm install -g appium\n  npm install -g appium@next\n  appium -v\n  ```\n\n#### 4. Install Appium Doctor\n- Run the following commands in the command prompt:\n  ```bash\n  npm install @appium/doctor --location=global\n  appium-doctor --android\n  ```\n\n#### 5. Install Appium Server\n- Download the Appium Desktop application from [Appium](https://appium.io/downloads.html) and install it.\n- Alternatively, you can start the Appium server from the command line:\n  ```bash\n  appium\n  ```\n\n#### 6. Install UiAutomator2 (for Android)\n- Run the following commands in the command prompt:\n  ```bash\n  appium driver install uiautomator2\n  appium driver list\n  ```\n\n#### 7. Install XCUITest (for iOS on MacOS)\nIf you are using MacOS and need to test iOS devices, you should install the XCUITest driver:\n  ```bash\n  appium driver install xcuitest\n  ```\n\n#### 8. Install Android SDK\n- Download and install the Android SDK from [Android Studio](https://developer.android.com/studio).\n- **Environment Variable Setup:**\n    - Add the following to the system environment variables:\n        - `ANDROID_HOME`: `C:\\Users\\YourUsername\\AppData\\Local\\Android\\Sdk`\n        - `Path`:\n            - `%ANDROID_HOME%\\platform-tools`\n            - `%ANDROID_HOME%\\cmdline-tools`\n\n- **SDK Setup in Android Studio:**\n    1. Open Android Studio and go to `More actions` \u003e `SDK Manager`.\n    2. Under `SDK Platforms`, ensure `Android API 34` is selected.\n    3. Under `SDK Tools`, ensure the following are installed:\n        - `Android SDK Build-Tools 34`\n        - `Android SDK Command Line Tools`\n        - `Android SDK Tools (Obsolete)` (Uncheck \"Hide Obsolete Packages\" to see this)\n        - `Android Emulator`\n        - `Android Emulator hypervisor driver (for AMD processors)`\n        - `Android SDK Platform-Tools`\n        - `Intel x86 Emulator Accelerator (HAXM installer)` (Ensure virtualization is enabled in BIOS)\n\n#### 9. Emulator Setup\n- For AMD processors, ensure `Android Emulator Hypervisor Driver for AMD Processors (installer)` is selected and applied.\n\n#### 10. Windows Features\n- Open Windows Features and ensure the following are NOT selected:\n    - `Hyper-V`\n    - `Virtual Machine Platform`\n    - `Windows Hypervisor Platform`\n\n#### 11. Install Appium Inspector\nAppium Inspector is a tool for inspecting mobile applications. To install it, download the latest version from the [Appium Inspector releases page](https://github.com/appium/appium-inspector/releases) and follow the installation instructions for your operating system.\n\n### 📁 Project Structure\n```plaintext\nappium-mobile-automation-framework\n├── .idea\n├── src\n│   ├── apk\n│   ├── main\n│   └── test\n│       └── java\n│           └── com\n│               └── webdriverio\n│                   ├── base\n│                   ├── pages\n│                   ├── tests\n│                   └── utils\n│       └── resources\n│           └── logs\n│               └── log4j2.xml\n├── target\n├── .gitignore\n├── appium-mobile-automation-framework.iml\n├── LICENSE\n├── pom.xml\n├── README.md\n└── testng.xml\n```\n\n- **com.webdriverio.base**: Contains base classes for the project.\n- **com.webdriverio.pages**: Contains page object classes for the mobile application.\n- **com.webdriverio.tests**: Contains TestNG test classes.\n- **com.webdriverio.utils**: Contains utility classes for the project.\n- **resources.logs**: Contains log configuration files.\n\n### ▶️ Running the Tests\n**Important**: Ensure that your Android device or emulator is running and properly configured before executing the tests.\n\n#### Using Maven\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/cihat-kose/appium-mobile-automation-framework.git\n   cd appium-mobile-automation-framework\n   ```\n\n2. **Start Android Emulator or Connect a Physical Device**:\n    - Start your Android emulator from Android Studio or connect a physical device via USB and ensure it is in developer mode.\n\n3. **Run the Tests**:\n    - Use Maven to run the tests:\n      ```bash\n      mvn clean test\n      ```\n\n#### Using TestNG in IDE\n1. **Start Android Emulator or Connect a Physical Device**:\n    - Start your Android emulator from Android Studio or connect a physical device via USB and ensure it is in developer mode.\n\n2. **Run the Tests from LoginTest Class**:\n    - Open the `LoginTest` class in your IDE.\n    - Right-click on the class or the test method and select `Run 'LoginTest'` or `Run 'testLogin'`.\n\n### 📌 Project Details\n- **AppiumServer Class**: Manages the Appium server lifecycle.\n- **DriverManager Class**: Handles the initialization of the Android driver.\n- **LoginPage Class**: Contains methods to interact with the login page.\n- **LoginTest Class**: Contains TestNG test cases for verifying the login functionality.\n\n### 📝 Logging\nThe project uses Log4j2 for logging. Configuration is set in the `log4j2.xml` file located in the `src/test/resources/logs` directory. Logs provide detailed information about the test execution and any issues encountered.\n\n### 👥 Contributors\n- [cihat-kose](https://github.com/cihat-kose)\n\n### 🤝 Contributing\nContributions are welcome! Please fork the repository and create a pull request.\n\n### 📜 License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### 📞 Contact\nFor any questions or suggestions, please open an issue or contact the repository owner.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Fappium-mobile-automation-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcihat-kose%2Fappium-mobile-automation-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Fappium-mobile-automation-framework/lists"}