Skip to content

About

Selenium examples for Behave and BrowserStack Automate

Resources

Stars

14 stars

Watchers

16 watching

Forks

Latest commit

 

History

66 Commits

Folders and files

Repository files navigation

behave-browserstack

Behave Integration with BrowserStack.

BrowserStack Logo

Prerequisite

python3 should be installed

Setup

  • Clone the repo
    git clone -b sdk https://github.com/browserstack/behave-browserstack.git
    
  • It is recommended to use a virtual environment to install dependencies. To create a virtual environment:
    python3 -m venv env
    source env/bin/activate # on Mac/Linux
    env\Scripts\activate # on Windows
    
  • Install dependencies
    pip install -r requirements.txt
    

Set BrowserStack Credentials

  • Add your BrowserStack username and access key in the browserstack.yml config fle.
  • You can also export them as environment variables, BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY:

    For Linux/MacOS

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

    For Windows

    set BROWSERSTACK_USERNAME=<browserstack-username>
    set BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    
    setx BROWSERSTACK_USERNAME=<browserstack-username>
    setx BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    

Running tests

  • To run sample tests:
    • To run the sample tests in parallel across the platforms defined in the browserstack.yml file, run:
      browserstack-sdk behave features/test.feature
      
  • To run tests on locally hosted websites:
    • To run the local test in parallel across the platforms defined in the browserstack.yml file, run:
      browserstack-sdk behave features/local-test.feature
      

Notes

Additional Resources

About

Selenium examples for Behave and BrowserStack Automate

Resources

Stars

14 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages