{"id":21944769,"url":"https://github.com/browserstack/junit-appium-app-browserstack","last_synced_at":"2025-09-03T20:39:46.669Z","repository":{"id":43699466,"uuid":"99221768","full_name":"browserstack/junit-appium-app-browserstack","owner":"browserstack","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-04T08:31:59.000Z","size":37350,"stargazers_count":7,"open_issues_count":7,"forks_count":23,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-22T21:07:11.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-03T10:38:34.000Z","updated_at":"2025-04-17T23:48:13.000Z","dependencies_parsed_at":"2024-12-18T11:52:03.926Z","dependency_job_id":null,"html_url":"https://github.com/browserstack/junit-appium-app-browserstack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fjunit-appium-app-browserstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fjunit-appium-app-browserstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fjunit-appium-app-browserstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fjunit-appium-app-browserstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserstack","download_url":"https://codeload.github.com/browserstack/junit-appium-app-browserstack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250324689,"owners_count":21411946,"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":[],"created_at":"2024-11-29T04:17:05.865Z","updated_at":"2025-04-22T21:07:36.789Z","avatar_url":"https://github.com/browserstack.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# junit-appium-app-browserstack\n\nThis repository demonstrates how to run Appium tests in [JUnit4](http://junit.org/junit4/) and [Junit5](https://junit.org/junit5/) on BrowserStack App Automate.\n\n![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780)\n\n## Based on\n\nThese code samples are currently based on:\n\n- **Appium-Java-Client:** `8.1.1`\n- **Protocol:** `W3C`\n\n## Setup\n\n### Requirements\n\n1. Java 8+\n\n    - If Java is not installed, follow these instructions:\n        - For Windows, download latest java version from [here](https://java.com/en/download/) and run the installer executable\n        - For Mac and Linux, run `java -version` to see what java version is pre-installed. If you want a different version download from [here](https://java.com/en/download/)\n\n2. Maven (Only required if using Maven as the build tool)\n\n   - If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi)\n   - For installation, follow the instructions [here](https://maven.apache.org/install.html)\n\n3. Gradle (Only required if using Gradle as the build tool)\n\n  - If Gradle is not downloaded, download it from [here](https://gradle.org/releases/)  \n  - For installation, follow the instructions [here](https://gradle.org/install/)   \n\n### Install the dependencies\n\nTo install the dependencies for JUnit4 tests, run :\n\n- For Android\n\n    ```sh\n    cd junit-4/android\n    mvn clean\n    ```\n\n- For iOS\n\n    ```sh\n    cd junit-4/ios\n    mvn clean\n    ```\n\nOr,\n\nTo install the dependencies for JUnit5 tests, run :\n\n- For Android\n\n    ```sh\n    cd junit-5/android\n    mvn clean\n    ```\n\n- For iOS\n\n    ```sh\n    cd junit-5/ios\n    mvn clean\n    ```\n\n## Getting Started\n\nGetting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't be easier!\n\n### **Run first test :**\n\n- Junit4\n  - Update `browserstack.yml` file at root level of [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)\n  - **For Maven:** Run the following command to execute tests in the Maven environment:  \n    ```sh\n    mvn test -P sample-test\n    ```\n  - **For Gradle:** Run the following command to execute tests in the Gradle environment:  \n    ```sh\n    gradle clean sampleTest\n    ```\n\n- Junit5\n  - Update `browserstack.yml` file at root level of [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)\n  - **For Maven:** Run the following command to execute tests in the Maven environment:  \n    ```sh\n    mvn test -P sample-test\n    ```\n  - **For Gradle:** Run the following command to execute tests in the Gradle environment:  \n    ```sh\n    gradle clean sampleTest\n    ```\n\n### **Use Local testing for apps that access resources hosted in development or testing environments :**\n\n- Junit4\n  - Update `browserstack.yml` file at root level of [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)\n  - Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios).\n    ```\n    browserstackLocal: true\n    ```\n  - **For Maven:** Run the following command to execute tests in the Maven environment:  \n    ```sh\n    mvn test -P sample-local-test\n    ```\n  - **For Gradle:** Run the following command to execute tests in the Gradle environment:  \n    ```sh\n    gradle clean sampleLocalTest\n    ```\n\n- Junit5\n  - Update `browserstack.yml` file at root level of Android Junit5 examples or iOS Junit5 examples with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)\n  - Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios).\n      ```\n      browserstackLocal: true\n      ```\n  - **For Maven:** Run the following command to execute tests in the Maven environment:  \n    ```sh\n    mvn test -P sample-local-test\n    ```\n  - **For Gradle:** Run the following command to execute tests in the Gradle environment:  \n    ```sh\n    gradle clean sampleLocalTest\n    ```\n\n**Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help)\n\n## Integration with other Java frameworks\n\nFor other Java frameworks samples, refer to following repositories :\n\n- [TestNG](https://github.com/browserstack/testng-appium-app-browserstack)\n- [Java](https://github.com/browserstack/java-appium-app-browserstack)\n\nNote: For other test frameworks supported by App-Automate refer our [Developer documentation](https://www.browserstack.com/docs/)\n\n## Getting Help\n\nIf you are running into any issues or have any queries, please check [Browserstack Support page](https://www.browserstack.com/support/app-automate) or [get in touch with us](https://www.browserstack.com/contact?ref=help).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fjunit-appium-app-browserstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserstack%2Fjunit-appium-app-browserstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fjunit-appium-app-browserstack/lists"}