|
1 | 1 | # cucumber-java-appium-app-browserstack |
2 | | -This repository demonstrates how to run Appium tests in Cucumber Java on BrowserStack App Automate. |
| 2 | + |
| 3 | +This repository demonstrates how to run Appium tests in Cucumber Testng on BrowserStack App Automate using BrowserStack SDK. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Setup |
| 8 | + |
| 9 | +### Requirements |
| 10 | + |
| 11 | +1. Java 8+ |
| 12 | + |
| 13 | + - If Java is not installed, follow these instructions: |
| 14 | + - For Windows, download latest java version from [here](https://java.com/en/download/) and run the installer executable |
| 15 | + - 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/) |
| 16 | + |
| 17 | +2. Maven |
| 18 | + - If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi) |
| 19 | + - For installation, follow the instructions [here](https://maven.apache.org/install.html) |
| 20 | + |
| 21 | +### Install the dependencies |
| 22 | + |
| 23 | +To install the dependencies for Android tests, run : |
| 24 | +```sh |
| 25 | +cd android/ |
| 26 | +mvn clean |
| 27 | +``` |
| 28 | + |
| 29 | +Or, |
| 30 | + |
| 31 | +To install the dependencies for iOS tests, run : |
| 32 | + |
| 33 | +```sh |
| 34 | +cd ios/ |
| 35 | +mvn clean |
| 36 | +``` |
| 37 | + |
| 38 | +## Getting Started |
| 39 | + |
| 40 | +Getting Started with Appium tests in Cucumber TestNg on BrowserStack couldn't be easier! |
| 41 | + |
| 42 | +### **Run Sample test :** |
| 43 | + |
| 44 | +- Switch to one of the following directories: [Android examples](android) or [iOS examples](ios) |
| 45 | +- Run the following maven command `mvn test -P sample-test` |
| 46 | + |
| 47 | +### **Use Local testing for apps that access resources hosted in development or testing environments :** |
| 48 | + |
| 49 | +- Simply configure the `browserstackLocal` parameter in the `browserstack.yml` file accordingly in [Android examples](android) or [iOS examples](ios). |
| 50 | + ``` |
| 51 | + browserstackLocal: true |
| 52 | + ``` |
| 53 | +- You can use the `LocalSample` app provided in both folder [Android examples](android) or [iOS examples](ios) to run your test. Change the app parameter in the `browserstack.yml` file and run the tests with the following command: `mvn test -P sample-local-test` |
| 54 | + |
| 55 | + |
| 56 | +**Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help) |
| 57 | + |
| 58 | +## Integration with other Java frameworks |
| 59 | + |
| 60 | +For other Java frameworks samples, refer to following repositories : |
| 61 | + |
| 62 | +- [JUnit](https://github.com/browserstack/junit-appium-app-browserstack) |
| 63 | +- [Java](https://github.com/browserstack/java-appium-app-browserstack) |
| 64 | + |
| 65 | +Note: For other test frameworks supported by App-Automate refer our [Developer documentation](https://www.browserstack.com/docs/) |
| 66 | + |
| 67 | +## Getting Help |
| 68 | + |
| 69 | +If 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). |
0 commit comments