Cucumber-TestNG Integration with BrowserStack.
- Clone the repo
- Install dependencies
mvn compile - Update
StepDefs.javafiles inside thesrc/test/java/*/StepDefs.javadirectory with your BrowserStack Username and Access Key
#Automate
- To run a single test, run
mvn test -P single - To run local tests, run
mvn test -P local - To run parallel tests, run
mvn test -P parallel
#App Automate
- Upload your Native App (.apk file, .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.apk"
-
If you do not have an .apk, .ipa file and looking to simply try App Automate, you can download our sample app from our documentation page https://www.browserstack.com/app-automate/appium-java and upload to the BrowserStack servers using the above API.
-
Update the desired capability "app" with the App URL returned from the above API call.
-
To run android test, run
mvn test -P android -
To run ios tests, run
mvn test -P ios
Understand how many parallel sessions you need by using our Parallel Test Calculator
-
You can view your test results on the BrowserStack Automate dashboard
-
To test on a different set of browsers, check out our platform configurator
-
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>
- Documentation for writing Automate test scripts in Java
- Customizing your tests on BrowserStack
- Browsers & mobile devices for selenium testing on BrowserStack
- Using REST API to access information about your tests via the command-line interface
- Using REST API to access information about your tests via the command-line interface
- Using REST API to access information about your tests via the command-line interface
