You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-8Lines changed: 47 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This repository demonstrates how to run Appium Java tests on BrowserStack App Au
19
19
20
20
### Install the dependencies
21
21
22
-
1. Run the following command in the project's base folder
22
+
To install the dependencies, run the following command in the project's base folder
23
23
24
24
```cmd
25
25
mvn clean install
@@ -29,7 +29,9 @@ mvn clean install
29
29
30
30
Getting Started with Appium tests in Java on BrowserStack couldn't be easier!
31
31
32
-
### Upload your Android or iOS App
32
+
### Run your first test :
33
+
34
+
**1. Upload your Android or iOS App**
33
35
34
36
Upload your Android app (.apk or .aab file) or iOS app (.ipa file) to BrowserStack servers using our REST API. Here is an example cURL request :
35
37
@@ -43,9 +45,7 @@ Ensure that @ symbol is prepended to the file path in the above request. Please
43
45
44
46
**Note**: If you do not have an .apk or .ipa file and are looking to simply try App Automate, you can download and test using our [sample Android app](https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk) or [sample iOS app](https://www.browserstack.com/app-automate/sample-apps/ios/BStackSampleApp.ipa).
45
47
46
-
### **Run first test :**
47
-
48
-
Open `BrowserStackAndroid.java` file in the `android` directory or `BrowserStackiOS.java` in the `ios` directory
48
+
**2. Open `BrowserStackAndroid.java` file in the `android` directory or `BrowserStackiOS.java` in the `ios` directory :**
49
49
50
50
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials
51
51
@@ -71,11 +71,50 @@ Open `BrowserStackAndroid.java` file in the `android` directory or `BrowserStack
71
71
72
72
- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard)
73
73
74
-
For more details, refer to our documentation - [Get Started with your first test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java)
74
+
---
75
+
76
+
### Use Local testing for apps that access resources hosted in development or testing environments :
77
+
78
+
**1. Upoad your Android or iOS App**
79
+
80
+
Upload your Android app (.apk or .aab file) or iOS app (.ipa file) that access resources hosted on your internal or test environments to BrowserStack servers using our REST API. Here is an example cURL request :
81
+
82
+
```
83
+
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
84
+
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
85
+
-F "file=@/path/to/apk/file"
86
+
```
87
+
88
+
Ensure that @ symbol is prepended to the file path in the above request. Please note the `app_url` value returned in the API response. We will use this to set the application under test while configuring the test later on.
89
+
90
+
**Note**: If you do not have an .apk or .ipa file and are looking to simply try App Automate, you can download and test using our [sample Android Local app](https://www.browserstack.com/app-automate/sample-apps/android/LocalSample.apk) or [sample iOS Local app](https://www.browserstack.com/app-automate/sample-apps/ios/LocalSample.ipa).
91
+
92
+
**2. Open `BrowserStackAndroidLocal.java` file in the `android` directory or `BrowserStackiOSLocal.java` in the `ios` directory :**
93
+
94
+
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials
95
+
96
+
- Replace `bs://<app-id>` with the URL obtained from app upload step
97
+
98
+
- Set the device and OS version
99
+
100
+
- If you have uploaded your own app update the test case
101
+
102
+
- To run the test, use the following command in the base directory :
103
+
104
+
- For Android test, run
75
105
76
-
### **Use Local testing for apps that access resources hosted in development or testing environments :**
106
+
```cmd
107
+
mvn test -P android-local-test
108
+
```
109
+
110
+
- For iOS test, run
111
+
112
+
```cmd
113
+
mvn test -P ios-local-test
114
+
```
115
+
116
+
- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard)
77
117
78
-
Refer to our documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/local-testing)
0 commit comments