This project is a fastlane plugin. To get started with
fastlane-plugin-browserstack, add it to your project by running:
fastlane add_plugin browserstack
Uploads IPA, APK and AAB files to BrowserStack for automation and manual testing.
Refer App Automate and App Live for more information on using this plugin.
Please refer this sample android project, which demonstrates the use of this plugin. You can easily upload your app using BrowserStack fastlane Plugin and execute your test on BrowserStack cloud. In order to configure the plugin add below action in your Fastfile. You can also check our repository.
upload_to_browserstack_app_automate( browserstack_username: ENV["BROWSERSTACK_USERNAME"], browserstack_access_key: ENV["BROWSERSTACK_ACCESS_KEY"], file_path: "<path_to_your_apk_ipa_or_aab_file>", custom_id: "<custom_id_name>" )
Note: custom_id is optional. You can upload multiple builds under the same custom_id. Use custom_id in 'app' capability for Appium to always pick the last uploaded build. The file_path parameter is not required if the app was built in the same lane with the help of Gradle or Gym plugin.
For uploading your app to AppLive use the following action in the fastfile
upload_to_browserstack_app_live( browserstack_username: ENV["BROWSERSTACK_USERNAME"], browserstack_access_key: ENV["BROWSERSTACK_ACCESS_KEY"], file_path: "<path_to_your_apk_ipa_or_aab_file>" )
Check out the example Fastfile to see how to use this plugin. Try it by including that in your project's Fastfile, running
fastlane install_plugins and
bundle exec fastlane test. Please refer to this sample android project, which demonstrates the use of this plugin.
Once the app upload is successful, the app id of the app will be stored in an environment variable, "BROWSERSTACK_APP_ID" and it can be accessed in your tests in the following way :
String app = System.getenv("BROWSERSTACK_APP_ID"); // Get app id from environment variable. capabilities.setCapability("app", app); // Add app id to driver capability.
Run tests for this plugin
To run both the tests, and code style validation, run
To automatically fix many of the styling issues, use
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the
fastlane plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.