An open API service indexing awesome lists of open source software.

https://github.com/browserstack/maestro-sample

Samples to support Mastro for iOS and Android apps on browserstack
https://github.com/browserstack/maestro-sample

Last synced: 7 days ago
JSON representation

Samples to support Mastro for iOS and Android apps on browserstack

Awesome Lists containing this project

README

          

# maestro-sample
This repo contains a sample test suite that can be used to run maestro tests on App Automate.

### To Run tests:
App for android: `sample_apps/sample_android.apk`
App for iOS: `sample_apps/sample_ios.ipa`
Upload the app using the command:
```
curl -u ":" \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
-F "file=@"
```
This should generate and return an app hash.

__Test Suite__: `tests/`
zip the `tests/` folder before uploading, and upload using the command:
```
curl -u ":" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/test-suite" \
-F "file=@" \
-F "custom_id=maestro_sample_tests"
```
This should generate and return a test suite hash.

Once the app and the zipped test suite are uploaded, use the following command to run tests:
For Android:
```
curl -u ":" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build" \
-H "Content-Type: application/json" \
-d '{
"app": "bs://",
"testSuite": "bs://",
"project": "Maestro_Sample_Repo",
"execute": ["android-flow.yaml"],
"devices": [
"Google Pixel 9-16.0",
"Samsung Galaxy S22-14.0",
"Samsung Galaxy Tab S11-16.0"
]
}'
```

For iOS:
```
curl -u ":" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/ios/build" \
-H "Content-Type: application/json" \
-d '{
"app": "bs://",
"testSuite": "bs://",
"project": "",
"execute": ["ios-flow.yaml"],
"devices": [
"iPhone 15-17.0",
"iPhone 12 Pro Max-16.0",
"iPad Pro 11 2021-18.0"
]
}'
```
This parallelly runs tests on the devices listed in the above command.