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
+10-52Lines changed: 10 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ This repository demonstrates how to run Appium NodeJS tests on BrowserStack App
17
17
To install the dependencies run the following command in the project's base directory :
18
18
19
19
```
20
-
npm install
20
+
- Open `Android` or in `ios` folder
21
+
22
+
- Run `npm install`
21
23
```
22
24
23
25
## Getting Started
@@ -26,69 +28,25 @@ Getting Started with Appium tests in NodeJS on BrowserStack couldn't be easier!
26
28
27
29
### Run your first test :
28
30
29
-
**1. Upoad your Android or iOS App**
30
-
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 :
32
-
33
-
```
34
-
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
35
-
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
36
-
-F "file=@/path/to/apk/file"
37
-
```
38
-
39
-
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.
40
-
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).
42
-
43
-
**2. Configure and run your first test**
44
-
45
-
Open `BrowserStackSample.js` file in `Android` or in `ios` folder
46
-
47
-
- Replace `YOUR_USERNAME` & `YOUR_ACCESS_KEY` with your BrowserStack access credentials. Get your BrowserStack access credentials from [here](https://www.browserstack.com/accounts/settings)
48
-
49
-
- Replace `bs://<app-id>` wkth the URL obtained from app upload step
50
-
51
-
- Set the device and OS version
31
+
Open `Android` or in `ios` folder
52
32
53
-
- If you have uploaded your own app update the test case
33
+
- If you have uploaded your app then add the app id to the `browserstack.yml` config file, or you can directly specify the path to your app in the `browserstack.yml` file.
54
34
55
-
- Run `node BrowserStackSample.js`
35
+
- Run `npm run sample-test`
56
36
57
37
- 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)
58
38
59
39
---
60
40
61
41
### **Use Local testing for apps that access resources hosted in development or testing environments :**
62
42
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. Get your BrowserStack access credentials from [here](https://www.browserstack.com/accounts/settings)
82
-
83
-
- Replace `bs://<app-id>` wkth the URL obtained from app upload step
84
-
85
-
- Set the device and OS version
43
+
Open `Android` or in `ios` folder
86
44
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.
45
+
- Ensure that `browserstackLocal` capability is set to `true` in the `browserstack.yml` file.
88
46
89
-
- If you have uploaded your own app update the test case
47
+
- If you have uploaded your app then add the app id to the `browserstack.yml` config file, or you can directly specify the path to your app in the `browserstack.yml` file.
90
48
91
-
- Run `node BrowserStackSampleLocal.js`
49
+
- Run `npm run sample-local-test`
92
50
93
51
- 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