Skip to content

BrowserStackCE/browserstack-robot-framework-appium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowserStack Integration with Robot Framework Appium (Python)

BrowserStack Logo

Setup

  • Clone the repo

  • Create a virtual environment

    python3 -m venv env
    source env/bin/activate
    
  • Install dependencies

    • pip install --upgrade -r requirements.txt
  • Upload your Android or iOS App
    Upload your Android app (.apk or .aab file) or iOS app (.ipa file) to BrowserStack servers using our REST API. Here is an example cURL request :

    curl -u "BROWSERSTACK_USERNAME:BROWSERSTACK_ACCESS_KEY" \
    -X POST "https://api-cloud.browserstack.com/app-automate/upload" \
    -F "file=@/path/to/apk/file"
    

The generated app_url is a unique ID used to identify the uploaded app build. You can add that to the config .yml file or directly set the path to the application in the config file under the app key.

Set BrowserStack Credentials

  • You can export the environment variables for the Username and Access Key of your BrowserStack account or you can set it in the config file.

    export BROWSERSTACK_USERNAME=<browserstack-username> &&
    export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    

Running tests

Android

  • To run single test, run
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-single.yml" && browserstack-sdk robot tests/android/SingleTestAndroid.robot
    
  • To run tests on multiple devices in parallel, run
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-parallel-devices.yml" && browserstack-sdk robot tests/android/SingleTestAndroid.robot
    
  • To run local tests, run
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-local.yml" && browserstack-sdk robot tests/android/LocalTestAndroid.robot
    
  • To run test suites in parallel
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-parallel.yml" && browserstack-sdk robot tests/android/*.robot
    
  • To run Test case level parallel tests we will be using the Pabot library,
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-parallel.yml" && browserstack-sdk pabot --testlevelsplit ./tests/android/ParallelTestAndroid.robot
    
  • To run Test cases and Test suites together in parallel we will also be using the Pabot library
    export BROWSERSTACK_CONFIG_FILE="tests/android/config/browserstack-parallel.yml" && browserstack-sdk pabot --testlevelsplit ./tests/android/*.robot
    

iOS

  • To run single test, run
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-single.yml" && browserstack-sdk robot tests/ios/SingleTestiOS.robot
    
  • To run tests on multiple devices in parallel, run
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-parallel-devices.yml" && browserstack-sdk robot tests/ios/SingleTestiOS.robot
    
  • To run local tests, run
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-local.yml" && browserstack-sdk robot tests/ios/LocalTestiOS.robot
    
  • To run test suites in parallel
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-parallel.yml" && browserstack-sdk robot tests/ios/*.robot
    
  • To run Test case level parallel tests we will be using the Pabot library,
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-parallel.yml" && browserstack-sdk pabot --testlevelsplit ./tests/ios/ParallelTestiOS.robot
    
  • To run Test cases and Test suites together in parallel we will also be using the Pabot library
    export BROWSERSTACK_CONFIG_FILE="tests/ios/config/browserstack-parallel.yml" && browserstack-sdk pabot --testlevelsplit ./tests/ios/*.robot
    

Understand how many parallel sessions you need by using our Parallel Test Calculator

Notes

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •