PHPUnit Integration with BrowserStack.
- Clone the repo
- Install dependencies
composer install
- Update dependencies
composer Update
- Update
*.conf.json
&*.php
files inside theconfig/android
andconfig/ios
with your BrowserStack Username and Access Key and App Hash ID
-
For Android
- Upload your Native App (.apk file) to BrowserStack servers using upload API:
curl -u "username:accesskey" -X POST "https://api.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.apk"
- If you do not have an .apk file and looking to simply try App Automate, you can download our sample app and upload to the BrowserStack servers using the above API.
- For single tests run
composer android_single
- For local tests run
composer android_local
- For parallel tests
php tests/android/parallel.php
- For local tests run
-
For IOS
- Upload your Native App (.ipa file) to BrowserStack servers using upload API:
curl -u "username:accesskey" -X POST "https://api.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.ipa"
- If you do not have an .ipa file and looking to simply try App Automate, you can download our sample app and upload to the BrowserStack servers using the above API.
- For single tests run
composer ios_single
- For local tests run
composer ios_local
- For parallel tests
php tests/ios/parallel.php
-
You can view your test results on the BrowserStack App Automate dashboard
-
You can export the environment variables for the Username and Access Key of your BrowserStack account
export BROWSERSTACK_USERNAME=<browserstack-username> && export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>