Skip to content

Commit 08fde6c

Browse files
committed
Updated WebDriverIO JS
1 parent 0074e97 commit 08fde6c

File tree

8 files changed

+47
-50
lines changed

8 files changed

+47
-50
lines changed

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ Set LambdaTest `Username` and `Access Key` in environment variables.
5959
**For Linux/macOS:**
6060

6161
```js
62-
export LT_USERNAME="YOUR_LAMBDATEST_USERNAME" \
63-
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
62+
export LT_USERNAME=YOUR_LAMBDATEST_USERNAME \
63+
export LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY
6464
```
6565

6666
**For Windows:**
6767

6868
```js
69-
set LT_USERNAME="YOUR_LAMBDATEST_USERNAME" `
70-
set LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
69+
set LT_USERNAME=YOUR_LAMBDATEST_USERNAME `
70+
set LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY
7171
```
7272

7373
### Upload Your Application
@@ -134,7 +134,7 @@ exports.config = {
134134
135135
updateJob: false,
136136
//highlight-next-line
137-
specs: ["./../specs/ios-test.js"], //path of your test script
137+
specs: ["specs/ios-test.js"], //path of your test script
138138
exclude: [],
139139
140140
//highlight-start
@@ -159,7 +159,7 @@ exports.config = {
159159
connectionRetryTimeout: 90000,
160160
connectionRetryCount: 3,
161161
path: "/wd/hub",
162-
hostname: "beta-hub.lambdatest.com",
162+
hostname: "mobile-hub.lambdatest.com",
163163
port: 80,
164164
165165
framework: "mocha",
@@ -180,7 +180,7 @@ exports.config = {
180180
181181
updateJob: false,
182182
//highlight-next-line
183-
specs: ["./../specs/android-test.js"], //path of your test script
183+
specs: ["specs/android-test.js"], //path of your test script
184184
exclude: [],
185185
186186
//highlight-start
@@ -205,7 +205,7 @@ exports.config = {
205205
connectionRetryTimeout: 90000,
206206
connectionRetryCount: 3,
207207
path: "/wd/hub",
208-
hostname: "beta-hub.lambdatest.com",
208+
hostname: "mobile-hub.lambdatest.com",
209209
port: 80,
210210
211211
framework: "mocha",
@@ -223,42 +223,44 @@ exports.config = {
223223
**Info Note:**
224224

225225
- You must add the generated **APP_URL** to the `"app"` capability in the config file.
226-
- You can generate capabilities for your test requirements with the help of our inbuilt :link: **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/beta/index.html)**. A more Detailed Capability Guide is available [here :page_facing_up:](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/) .
226+
- You can generate capabilities for your test requirements with the help of our inbuilt :link: **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/)**. A more Detailed Capability Guide is available [here :page_facing_up:](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/) .
227227

228228
## Executing The Tests
229229

230-
**Step-5:** Navigate to the corresponding directory based on your app.
231-
232-
**Android:**
230+
**Step-5:** Install the required dependencies using the following command:
233231

234232
```bash
235-
cd android-sample
233+
npm i
236234
```
237235

238-
**IOS:**
236+
**Step-6:** Execute the following command to run your test on LambdaTest platform:
237+
238+
**Single:**
239+
240+
- *MacOS/Linux*
239241

240242
```bash
241-
cd ios-sample
243+
npm run singleAndroid
242244
```
243245

244-
Install the required dependencies using the following command:
246+
- *Windows*
245247

246248
```bash
247-
npm i
249+
npm run singleAndroidWindows
248250
```
249251

250-
Execute the following command to run your test on LambdaTest platform:
252+
**Parallel:**
251253

252-
**Single:**
254+
- *MacOS/Linux*
253255

254256
```bash
255-
npm run single
257+
npm run parallelIOS
256258
```
257259

258-
**Parallel:**
260+
- *Windows*
259261

260262
```bash
261-
npm run parallel
263+
npm run parallelIOSWindows
262264
```
263265

264266
**Info:** Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the :link: [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-nodejs-webdriverio).

android-sample/android-parallel.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exports.config = {
33
key: process.env.LT_ACCESS_KEY || "YOUR_ACCESS_KEY",
44

55
updateJob: false,
6-
specs: ["./../specs/android-test.js"],
6+
specs: ["specs/android-test.js"],
77
exclude: [],
88

99
commonCapabilities: {

android-sample/android-single.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exports.config = {
33
key: process.env.LT_ACCESS_KEY || "YOUR_ACCESS_KEY",
44

55
updateJob: false,
6-
specs: ["./../specs/android-test.js"],
6+
specs: ["specs/android-test.js"],
77
exclude: [],
88

99
capabilities: [

android-sample/package.json

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

ios-sample/ios-parallel.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exports.config = {
33
key: process.env.LT_ACCESS_KEY || "YOUR_ACCESS_KEY",
44

55
updateJob: false,
6-
specs: ["./../specs/ios-test.js"],
6+
specs: ["specs/ios-test.js"],
77
exclude: [],
88

99
maxInstances: 10,

ios-sample/ios-single.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exports.config = {
33
key: process.env.LT_ACCESS_KEY || "YOUR_ACCESS_KEY",
44

55
updateJob: false,
6-
specs: ["./../specs/ios-test.js"],
6+
specs: ["specs/ios-test.js"],
77
exclude: [],
88

99
capabilities: [

ios-sample/package.json

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

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "webdriverio-appium-app",
3+
"scripts": {
4+
"singleAndroid": "./node_modules/.bin/wdio android-sample/android-single.conf.js",
5+
"parallelAndroid": "./node_modules/.bin/wdio android-sample/android-parallel.conf.js",
6+
"singleIOS": "./node_modules/.bin/wdio ios-sample/ios-single.conf.js",
7+
"parallelIOS": "./node_modules/.bin/wdio ios-sample/ios-parallel.conf.js",
8+
9+
"singleAndroidWindows": "node_modules\\.bin\\wdio android-sample\\android-single.conf.js",
10+
"parallelAndroidWindows": "node_modules\\.bin\\wdio android-sample\\android-parallel.conf.js",
11+
"singleIOSWindows": "node_modules\\.bin\\wdio ios-sample\\ios-single.conf.js",
12+
"parallelIOSWindows": "node_modules\\.bin\\wdio ios-sample\\ios-parallel.conf.js"
13+
},
14+
"dependencies": {
15+
"@wdio/cli": "^5.20.1",
16+
"@wdio/local-runner": "^5.20.1",
17+
"@wdio/mocha-framework": "^5.18.7"
18+
}
19+
}

0 commit comments

Comments
 (0)