Skip to content

Commit b3de697

Browse files
committed
Updating Readme
1 parent e755d2c commit b3de697

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ npm install
2424

2525
Getting Started with Appium tests in NodeJS on BrowserStack couldn't be easier!
2626

27-
### Upoad your Android or iOS App
27+
### Run your first test :
28+
29+
**1. Upoad your Android or iOS App**
2830

2931
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 :
3032

@@ -38,9 +40,9 @@ Ensure that @ symbol is prepended to the file path in the above request. Please
3840

3941
**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).
4042

41-
### **Run first test :**
43+
**2. Configure and run your first test**
4244

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
4446

4547
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials
4648

@@ -50,15 +52,45 @@ Open `BrowserStackSampleAndroid.js` file in Android folder or `BrowserStackSampl
5052

5153
- If you have uploaded your own app update the test case
5254

53-
- Run `node BrowserStackSampleAndroid.js` or `node BrowserStackSampleiOS.js`
55+
- Run `node BrowserStackSample.js`
5456

5557
- 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)
5658

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+
---
5860

5961
### **Use Local testing for apps that access resources hosted in development or testing environments :**
6062

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)
6294

6395
## Integration with other NodeJS frameworks
6496

0 commit comments

Comments
 (0)