Code samples to get started with Appium tests for your Native App using the Cucumber framework on BrowserStack, using the BrowserStack Ruby SDK.
- Ruby: If you don't have Ruby installed, follow the instructions given here
- Bundler: If you don't have Bundler installed, follow the instructions given here
To install the dependencies for Android tests, run:
cd android/examples
bundle installOr, to install the dependencies for iOS tests, run:
cd ios/examples
bundle installAll BrowserStack configuration is managed through a single browserstack.yml file located at android/examples/browserstack.yml.
userName: YOUR_BROWSERSTACK_USERNAME # or set BROWSERSTACK_USERNAME env var
accessKey: YOUR_BROWSERSTACK_ACCESS_KEY # or set BROWSERSTACK_ACCESS_KEY env var
app: bs://<app-id> # or set BROWSERSTACK_APP_ID env var
projectName: First Cucumber Android Project
buildName: browserstack-build-1
platforms:
- deviceName: Google Pixel 8 Pro
osVersion: "14.0"
platformName: android
debug: true
browserStackLocal: false # set to true for local testingSet browserStackLocal: true in browserstack.yml.
browserStackLocal: trueAll tests are run from the android/examples/ directory using the browserstack-sdk exec CLI.
cd android/examples
bundle exec browserstack-sdk exec cucumber run-first-test/featuresEnsure platforms: in browserstack.yml has multiple device entries, then run:
cd android/examples
bundle exec browserstack-sdk exec cucumber run-parallel-tests/featuresEnsure browserStackLocal: true is set in browserstack.yml, then run:
cd android/examples
bundle exec browserstack-sdk exec cucumber run-local-test/featuresIf you are running into any issues or have any queries, please check the BrowserStack Support page or get in touch with us.
Note: For other test frameworks supported by App Automate, refer to our Developer documentation.
