Run Behave Tests in Parallel
On BrowserStack, you can run multiple Behave tests at the same time across various browser, device and OS combinations. This is Parallel Testing. Parallel Testing gives you the same benefits as running a multi-threaded application and helps you reduce the run time of your test suite, resulting in faster build times and faster releases.
To run tests on multiple browsers in parallel with Behave on BrowserStack Automate, follow the below steps:
- Clone the behave-browserstack repo on GitHub (if not already done):
git clone https://github.com/browserstack/behave-browserstack cd behave-browserstack
- Install the dependencies using the following command:
pip install -r requirements.txt
- Update
parallel.json
files within thebehave-browserstack/config/
directory with your credentials as shown below:
{ "server": "hub.browserstack.com", "user": "YOUR_USERNAME", "key": "YOUR_ACCESS_KEY", "capabilities": { "browserstack.debug": true, "name": "Bstack-[Behave] Parallel Test" }, "environments": [{ "browser": "chrome" },{ "browser": "firefox" },{ "browser": "safari" },{ "browser": "internet explorer" }] }
Note: You can choose any environment to run your tests. Select browsers and os and set those capabilities in the
environments
section of the above snippet, to run your test in those specific environments. - Now, execute the test using the following command:
paver run parallel
- View your test results on the BrowserStack Automate dashboard.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!