Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

testng-appium-app-browserstack

This repository demonstrates how to run Appium tests in TestNG on BrowserStack App Automate using direct (non-SDK) integration.

BrowserStack Logo

Setup

Requirements

  1. Java 8+

    • If Java is not installed, follow these instructions:
      • For Windows, download latest java version from here and run the installer executable
      • For Mac and Linux, run java -version to see what java version is pre-installed. If you want a different version download from here
  2. Maven (Only required if using Maven as the build tool)

    • If Maven is not downloaded, download it from here
    • For installation, follow the instructions here
  3. Gradle (Only required if using Gradle as the build tool)

  • If Gradle is not downloaded, download it from here
  • For installation, follow the instructions here

Install the dependencies

To install the dependencies for Android tests, run :

cd android/testng-examples
mvn clean install

Or,

To install the dependencies for iOS tests, run :

cd ios/testng-examples
mvn clean install

Getting Started

Getting Started with Appium tests in TestNG on BrowserStack (Non-SDK Integration)

Run Sample Test (Non-SDK Integration):

  1. Switch to one of the following directories: Android examples or iOS examples
  2. Set the following environment variables with your BrowserStack credentials and app URL:
    • BROWSERSTACK_USERNAME (your BrowserStack username)
    • BROWSERSTACK_ACCESS_KEY (your BrowserStack access key)
    • BROWSERSTACK_APP (your uploaded app URL, e.g. bs://<your-app-url>)
  3. For Maven: Run the following command to execute tests in the Maven environment:
    mvn test -P sample-test
  4. For Gradle: Run the following command to execute tests in the Gradle environment:
    gradle clean sampleTest

Use Local testing for apps that access resources hosted in development or testing environments:

  • Set the browserstackLocal capability to true in your test code if you want to enable local testing.

  • You can use the LocalSample app provided in both folders (Android examples or iOS examples) to run your test. Set the app capability to the correct app URL.

  • For Maven:

    mvn test -P sample-local-test
  • For Gradle:

    gradle clean sampleLocalTest

Note: If you are facing any issues, refer Getting Help section

Integration with other Java frameworks

For other Java frameworks samples, refer to following repositories :

Note: For other test frameworks supported by App Automate, refer to our Developer documentation

Getting Help

If you are running into any issues or have any queries, please check Browserstack Support page or get in touch with us.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages