This repository demonstrates how to run Appium tests in JUnit4 and Junit5 on BrowserStack App Automate.
These code samples are currently based on:
- Appium-Java-Client:
8.1.1
- Protocol:
W3C
-
Java 8+
-
Maven
To install the dependencies for JUnit4 tests, run :
-
For Android
cd junit-4/android mvn clean
-
For iOS
cd junit-4/ios mvn clean
Or,
To install the dependencies for JUnit5 tests, run :
-
For Android
cd junit-5/android mvn clean
-
For iOS
cd junit-5/ios mvn clean
Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't be easier!
-
Junit4
- Update
browserstack.yml
file at root level of Android Junit4 examples or iOS Junit4 examples with your BrowserStack Username and Access Key - Run
mvn test -P sample-test
- Update
-
Junit5
- Update
browserstack.yml
file at root level of Android Junit5 examples or iOS Junit5 examples with your BrowserStack Username and Access Key - Run
mvn test -P sample-test
- Update
- Junit4
-
Update
browserstack.yml
file at root level of Android Junit4 examples or iOS Junit4 examples with your BrowserStack Username and Access Key -
Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in Android Junit4 examples or iOS Junit4 examples.
browserstackLocal: true
-
Run
mvn test -P sample-local-test
-
Junit5
- Update
browserstack.yml
file at root level of Android Junit5 examples or iOS Junit5 examples with your BrowserStack Username and Access Key - Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in Android Junit5 examples or iOS Junit5 examples.
browserstackLocal: true
- Run
mvn test -P sample-local-test
- Update
-
Note: If you are facing any issues, refer Getting Help section
For other Java frameworks samples, refer to following repositories :
Note: For other test frameworks supported by App-Automate refer our Developer documentation
If you are running into any issues or have any queries, please check Browserstack Support page or get in touch with us.