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
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,9 @@ npm install
24
24
25
25
Getting Started with Appium tests in NodeJS on BrowserStack couldn't be easier!
26
26
27
-
### Upoad your Android or iOS App
27
+
### Run your first test :
28
+
29
+
**1. Upoad your Android or iOS App**
28
30
29
31
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 :
30
32
@@ -38,9 +40,9 @@ Ensure that @ symbol is prepended to the file path in the above request. Please
38
40
39
41
**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).
40
42
41
-
### **Run first test :**
43
+
**2. Configure and run your first test**
42
44
43
-
Open `BrowserStackSampleAndroid.js` file in Android folder or `BrowserStackSampleiOS.js`in ios folder
45
+
Open `BrowserStackSample.js` file in `Android`or in `ios` folder
44
46
45
47
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials
46
48
@@ -50,15 +52,45 @@ Open `BrowserStackSampleAndroid.js` file in Android folder or `BrowserStackSampl
50
52
51
53
- If you have uploaded your own app update the test case
52
54
53
-
- Run `node BrowserStackSampleAndroid.js` or `node BrowserStackSampleiOS.js`
55
+
- Run `node BrowserStackSample.js`
54
56
55
57
- 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)
56
58
57
-
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/nodejs)
59
+
---
58
60
59
61
### **Use Local testing for apps that access resources hosted in development or testing environments :**
60
62
61
-
Refer to our documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/nodejs/local-testing)
63
+
**1. Upload your Android or iOS App**
64
+
65
+
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 :
66
+
67
+
```
68
+
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
69
+
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
70
+
-F "file=@/path/to/apk/file"
71
+
```
72
+
73
+
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.
74
+
75
+
**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).
76
+
77
+
**2. Configure and run your local tes**
78
+
79
+
Open `BrowserStackSampleLocal.js` file in `Android` or in `ios` folder
80
+
81
+
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials
82
+
83
+
- Replace `bs://<app-id>` wkth the URL obtained from app upload step
84
+
85
+
- Set the device and OS version
86
+
87
+
- Ensure that `browserstack.local` capability is set to `true`. Within the test script, there is code snippet that automatically establishes Local Testing connection to BrowserStack servers using Javascript binding for BrowserStack Local.
88
+
89
+
- If you have uploaded your own app update the test case
90
+
91
+
- Run `node BrowserStackSampleLocal.js`
92
+
93
+
- 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)
0 commit comments