Skip to content

Commit 3e0c727

Browse files
authored
Merge pull request #30 from browserstack/merge_sdk_to_master
Merge sdk to master
2 parents fd3c582 + 6788990 commit 3e0c727

File tree

66 files changed

+1140
-2192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1140
-2192
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
target/
33
local.log
44
.idea
5+
*/*/logs
56
*.iml

README.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ This repository demonstrates how to run Appium tests in [JUnit4](http://junit.or
44

55
![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780)
66

7+
## Based on
8+
9+
These code samples are currently based on:
10+
11+
- **Appium-Java-Client:** `8.1.1`
12+
- **Protocol:** `W3C`
13+
714
## Setup
815

916
### Requirements
@@ -20,37 +27,37 @@ This repository demonstrates how to run Appium tests in [JUnit4](http://junit.or
2027

2128
### Install the dependencies
2229

23-
To install the dependencies for Android tests, run :
30+
To install the dependencies for JUnit4 tests, run :
2431

25-
- For Junit4
32+
- For Android
2633

2734
```sh
28-
cd android/junit4-examples
35+
cd junit-4/android
2936
mvn clean
3037
```
3138

32-
- For Junit5
39+
- For iOS
3340

3441
```sh
35-
cd android/junit5-examples
42+
cd junit-4/ios
3643
mvn clean
3744
```
3845

3946
Or,
4047

41-
To install the dependencies for iOS tests, run :
48+
To install the dependencies for JUnit5 tests, run :
4249

43-
- For Junit4
50+
- For Android
4451

4552
```sh
46-
cd ios/junit4-examples
53+
cd junit-5/android
4754
mvn clean
4855
```
4956

50-
- For Junit5
57+
- For iOS
5158

5259
```sh
53-
cd ios/junit5-examples
60+
cd junit-5/ios
5461
mvn clean
5562
```
5663

@@ -61,32 +68,30 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't
6168
### **Run first test :**
6269
6370
- Junit4
64-
- Switch to `run_first_test` directory under [Android Junit4 examples](android/junit4-examples) or [iOS Junit4 examples](ios/junit4-examples)
65-
- Follow the steps outlined in the documentation - [Get Started with your first test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit)
71+
- 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)
72+
- Run `mvn test -P sample-test`
6673
6774
- Junit5
68-
- Switch to `run_first_test` directory under [Android Junit5 examples](android/junit5-examples) or [iOS Junit5 examples](ios/junit5-examples)
69-
- Follow the steps outlined in the documentation - [Get Started with your first test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit)
70-
71-
### **Speed up test execution with parallel testing :**
72-
73-
- Junit4
74-
- Switch to `run_parallel_test` directory under [Android Junit4 examples](android/junit4-examples/) or [iOS Junit4 examples](ios/junit4-examples/)
75-
- Follow the steps outlined in the documentation - [Get Started with parallel testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit/parallelize-tests)
76-
77-
- Junit5
78-
- Switch to `run_parallel_test` directory under [Android Junit5 examples](android/junit5-examples/) or [iOS Junit5 examples](ios/junit5-examples/)
79-
- Follow the steps outlined in the documentation - [Get Started with parallel testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit/parallelize-tests)
75+
- 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)
76+
- Run `mvn test -P sample-test`
8077
8178
### **Use Local testing for apps that access resources hosted in development or testing environments :**
8279
8380
- Junit4
84-
- Switch to `run_local_test` directory under [Android Junit4 examples](android/junit4-examples/) or [iOS Junit4 examples](ios/junit4-examples/)
85-
- Follow the steps outlined in the documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit/local-testing)
86-
87-
- Junit5
88-
- Switch to `run_local_test` directory under [Android Junit5 examples](android/junit5-examples/) or [iOS Junit5 examples](ios/junit5-examples/)
89-
- Follow the steps outlined in the documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/junit/local-testing)
81+
- 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)
82+
- 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).
83+
```
84+
browserstackLocal: true
85+
```
86+
- Run `mvn test -P sample-local-test`
87+
88+
- Junit5
89+
- 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)
90+
- 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).
91+
```
92+
browserstackLocal: true
93+
```
94+
- Run `mvn test -P sample-local-test`
9095
9196
**Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help)
9297

android/junit4-examples/pom.xml

Lines changed: 0 additions & 126 deletions
This file was deleted.

android/junit4-examples/src/test/java/com/browserstack/run_first_test/BrowserStackJUnitTest.java

Lines changed: 0 additions & 96 deletions
This file was deleted.

android/junit4-examples/src/test/java/com/browserstack/run_first_test/FirstTest.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)