Skip to content

Commit 29b95e7

Browse files
committed
Updating readme according to the decided structure
1 parent fc0998b commit 29b95e7

File tree

1 file changed

+6
-56
lines changed

1 file changed

+6
-56
lines changed

README.md

Lines changed: 6 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# testng-appium-app-browserstack
22

3-
[TestNG](http://testng.org) Integration with BrowserStack.
3+
This repository demonstrates how to run Appium tests in [TestNG](http://testng.org) on BrowserStack App Automate.
44

55
![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780)
66

7+
## Setup
8+
79
### Requirements
810

911
1. Java 8+
@@ -33,76 +35,24 @@ cd ios/testng-examples
3335
mvn clean
3436
```
3537

36-
### Update `username` and `access_key` keys in *.conf.json
37-
38-
- Update *.conf.json files for `username`, `access_key` keys inside the [android/testng-examples/src/test/resources/](android/testng-examples/src/test/resources) for Android examples and inside [ios/testng-examples/src/test/resources](ios/testng-examples/src/test/resources) for iOS examples with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings).
39-
40-
- Note: You can also export the environment variables for the Username and Access Key of your BrowserStack account.
41-
42-
```
43-
export BROWSERSTACK_USERNAME=<browserstack-username> &&
44-
export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
45-
```
46-
47-
### Upload app and update `app` key in *.conf.json
48-
49-
- Android
50-
- Upload your Native App (.apk or .aab file) to BrowserStack servers using upload API:
51-
52-
```
53-
curl -u "username:access_key" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.apk"
54-
```
55-
- If you do not have an .apk file and looking to simply try App Automate, [you can download our sample app and upload](https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk)
56-
to the BrowserStack servers using the above API.
57-
58-
- You can use public url as well to upload your app
59-
60-
```
61-
curl -u "username:access_key" \
62-
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
63-
-F "url=https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk"
64-
```
65-
- Please note the value of app_url in the API response (bs://f7c874f21852.... in the above examples).
66-
67-
- Update *.conf.json with value of `app_url`(got from response) for `app` key
68-
69-
- Files inside the [android/testng-examples/src/test/resources/](android/testng-examples/src/test/resources) for Android examples and inside [ios/testng-examples/src/test/resources](ios/testng-examples/src/test/resources) for iOS examples.
70-
71-
7238
## Getting Started
7339

7440
Getting Started with Appium tests in TestNg on BrowserStack couldn't be easier!
7541

7642
### **Run first test :**
7743

7844
- Switch to `run_first_test` directory under [Android examples](android/testng-examples) or [iOS examples](ios/testng-examples)
79-
- Then run
80-
```sh
81-
mvn test -P first
82-
```
83-
- Alternatively, you can follow the steps outlined in the documentation - [Get Started with your first test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng)
45+
- Follow the steps outlined in the documentation - [Get Started with your first test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng)
8446

8547
### **Speed up test execution with parallel testing :**
8648

8749
- Switch to `run_parallel_test` directory under [Android examples](android/testng-examples/) or [iOS examples](ios/testng-examples/)
88-
- Then run
89-
```sh
90-
mvn test -P parallel
91-
```
92-
93-
- Alternatively, you can follow the steps outlined in the documentation - [Get Started with your parallel test on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng/parallelize-tests)
50+
- Follow the steps outlined in the documentation - [Get Started with parallel testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng/parallelize-tests)
9451

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

97-
- If you do not have an local .apk file and looking to simply try local for App Automate, [you can download our sample local app and upload](https://www.browserstack.com/app-automate/sample-apps/android/LocalSample.apk)
98-
to the BrowserStack servers using the same app upload API.
99-
10054
- Switch to `run_local_test` directory under [Android examples](android/testng-examples/) or [iOS examples](ios/testng-examples/)
101-
- Then run
102-
```sh
103-
mvn test -P local
104-
```
105-
- Alternatively, you can follow the steps outlined in the documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng/local-testing)
55+
- Follow the steps outlined in the documentation - [Get Started with Local testing on App Automate](https://www.browserstack.com/docs/app-automate/appium/getting-started/java/testng/local-testing)
10656

10757
**Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help)
10858

0 commit comments

Comments
 (0)