Skip to content

Commit 0790f6c

Browse files
committed
Resolving comments and making consistent
1 parent b6b5da5 commit 0790f6c

File tree

6 files changed

+29
-26
lines changed

6 files changed

+29
-26
lines changed

.github/workflows/maven-workflow-run.yml

+5-17
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,14 @@ jobs:
6767
cd android/testng-examples
6868
mvn compile
6969
mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk"
70-
- name: Run Gradle test for testng Android
70+
- name: Run Gradle sample-test for testng Android
7171
run: |
7272
cd android/testng-examples
7373
gradle clean sampleTest
74-
75-
- name: Run Gradle profile sampleTest for testng Android
76-
run: |
77-
cd android/testng-examples
78-
gradle clean sampleLocalTest
79-
80-
- name: Run Gradle profile sampleLocalTest for testng Android
74+
- name: Run Gradle sampleLocalTest for testng Android
8175
run: |
8276
cd android/testng-examples
83-
gradle clean sampleLocalTest -Dbrowserstack.app=./LocalSample.apk
77+
gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.apk"
8478
- name: Run mvn test for testng ios
8579
run: |
8680
cd ios/testng-examples
@@ -96,17 +90,11 @@ jobs:
9690
cd ios/testng-examples
9791
mvn compile
9892
mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa"
99-
- name: Run Gradle test for testng ios
93+
- name: Run Gradle sample-test for testng ios
10094
run: |
10195
cd ios/testng-examples
10296
gradle clean sampleTest
103-
104-
- name: Run Gradle profile sampleTest for testng ios
105-
run: |
106-
cd ios/testng-examples
107-
gradle clean sampleLocalTest
108-
109-
- name: Run Gradle profile sampleLocalTest for testng ios
97+
- name: Run Gradle sampleLocalTest for testng ios
11098
run: |
11199
cd ios/testng-examples
112100
gradle clean sample-local-test -D"browserstack.app"="./LocalSample.ipa"

README.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ This repository demonstrates how to run Appium tests in [TestNG](http://testng.o
1414
- For Windows, download latest java version from [here](https://java.com/en/download/) and run the installer executable
1515
- For Mac and Linux, run `java -version` to see what java version is pre-installed. If you want a different version download from [here](https://java.com/en/download/)
1616

17-
2. Maven
17+
2. Maven (Only required if using Maven as the build tool)
1818
- If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi)
1919
- For installation, follow the instructions [here](https://maven.apache.org/install.html)
2020

21-
3. Gradle
21+
3. Gradle (Only required if using Gradle as the build tool)
2222
- If Gradle is not downloaded, download it from [here](https://gradle.org/releases/)
2323
- For installation, follow the instructions [here](https://gradle.org/install/)
2424

@@ -46,16 +46,31 @@ Getting Started with Appium tests in TestNg on BrowserStack couldn't be easier!
4646
### **Run Sample test :**
4747

4848
- Switch to one of the following directories: [Android examples](android/testng-examples) or [iOS examples](ios/testng-examples)
49-
- Run the following maven command `mvn test -P sample-test`
50-
- Run the following gradle command `gradle clean sampleTest`
49+
- **For Maven:** Run the following command to execute tests in the Maven environment:
50+
```sh
51+
mvn test -P sample-test
52+
```
53+
- **For Gradle:** Run the following command to execute tests in the Gradle environment:
54+
```sh
55+
gradle clean sampleTest
56+
```
5157

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

5460
- Simply configure the `browserstackLocal` parameter in the `browserstack.yml` file accordingly in [Android examples](android/testng-examples) or [iOS examples](ios/testng-examples).
5561
```
5662
browserstackLocal: true
5763
```
58-
- You can use the `LocalSample` app provided in both folder [Android examples](android/testng-examples) or [iOS examples](ios/testng-examples) to run your test. Change the app parameter in the `browserstack.yml` file and run the tests with the following command: `mvn test -P sample-local-test`
64+
- You can use the `LocalSample` app provided in both folder [Android examples](android/testng-examples) or [iOS examples](ios/testng-examples) to run your test. Change the app parameter in the `browserstack.yml` file.
65+
66+
- **For Maven:** Run the following command to execute tests in the Maven environment:
67+
```sh
68+
mvn test -P sample-local-test
69+
```
70+
- **For Gradle:** Run the following command to execute tests in the Gradle environment:
71+
```sh
72+
gradle clean sampleLocalTest
73+
```
5974
6075
-similarly for gradle you can do :- gradle clean sampleLocalTest
6176

android/testng-examples/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ task sampleLocalTest(type: Test) {
4444
suites "src/test/resources/com/browserstack/sample-local-test.testng.xml"
4545
jvmArgs "-javaagent:${browserstackSDKArtifact.file}"
4646
}
47-
}
47+
}

android/testng-examples/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pluginManagement {
1313
}
1414
}
1515
}
16-
rootProject.name = 'testng-browserstack-android'
16+
rootProject.name = 'testng-browserstack-android'

ios/testng-examples/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ task sampleLocalTest(type: Test) {
4444
suites "src/test/resources/com/browserstack/sample-local-test.testng.xml"
4545
jvmArgs "-javaagent:${browserstackSDKArtifact.file}"
4646
}
47-
}
47+
}

ios/testng-examples/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pluginManagement {
1313
}
1414
}
1515
}
16-
rootProject.name = 'testng-browserstack-ios'
16+
rootProject.name = 'testng-browserstack-ios'

0 commit comments

Comments
 (0)