From c878d8430349725ca81a4f0c5de6aa1cfd987ace Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Fri, 5 Aug 2022 18:42:36 +0530 Subject: [PATCH 01/13] add: Selenium 3 --- .browserstack | 3 --- config/local.json | 28 ++++++++++++---------------- config/parallel.json | 42 ++++++++++++++++-------------------------- config/single.json | 28 ++++++++++++---------------- conftest.py | 2 +- 5 files changed, 41 insertions(+), 62 deletions(-) delete mode 100644 .browserstack diff --git a/.browserstack b/.browserstack deleted file mode 100644 index 2eb6b4b..0000000 --- a/.browserstack +++ /dev/null @@ -1,3 +0,0 @@ -[credentials] -username = BROWSERSTACK_USERNAME -key = BROWSERSTACK_ACCESS_KEY diff --git a/config/local.json b/config/local.json index cad383c..2395852 100644 --- a/config/local.json +++ b/config/local.json @@ -1,23 +1,19 @@ { "capabilities": { - "bstack:options": { - "projectName": "Pytest Browserstack", - "buildName": "pytest-browserstack", - "sessionName": "local_test", - "local": true, - "debug" : "true", - "networkLogs": "true", - "seleniumVersion": "3.14.0" - } + "project": "Pytest Browserstack", + "build": "pytest-browserstack", + "name": "local_test", + "browserstack.local": true, + "browserstack.debug": "true", + "browserstack.networkLogs": "true", + "browserstack.selenium_version": "3.14.0" }, "environments": [ { - "bstack:options": { - "os": "Windows", - "osVersion": "11" - }, - "browserName": "chrome", - "browserVersion": "latest" + "os": "Windows", + "os_version": "11", + "browser": "Chrome", + "browser_version": "latest" } ] -} +} \ No newline at end of file diff --git a/config/parallel.json b/config/parallel.json index a2ad611..e48558e 100644 --- a/config/parallel.json +++ b/config/parallel.json @@ -1,39 +1,29 @@ { "capabilities": { - "bstack:options": { - "projectName": "Pytest Browserstack", - "buildName": "pytest-browserstack", - "sessionName": "parallel_test", - "local": false, - "debug" : "true", - "networkLogs": "true", - "seleniumVersion": "3.14.0" - } + "project": "Pytest Browserstack", + "build": "pytest-browserstack", + "name": "local_test", + "browserstack.local": false, + "browserstack.debug": "true", + "browserstack.networkLogs": "true", + "browserstack.selenium_version": "3.14.0" }, "environments": [ { - "bstack:options": { - "os": "Windows", - "osVersion": "11" - }, + "os": "Windows", + "os_version": "11", "browser": "chrome", - "browserVersion": "latest" + "browser_version": "latest" }, { - "bstack:options": { - "os" : "OS X", - "osVersion" : "Monterey" - }, + "os": "OS X", + "os_version": "Monterey", "browser": "firefox", - "browserVersion": "latest" + "browser_version": "latest" }, { - "bstack:options": { - "osVersion" : "10.0", - "deviceName" : "Samsung Galaxy S20" - }, - "browserName": "firefox", - "browserVersion": "latest" + "os_version": "10.0", + "device": "Samsung Galaxy S20" } ] -} +} \ No newline at end of file diff --git a/config/single.json b/config/single.json index 0a9bc48..214c247 100644 --- a/config/single.json +++ b/config/single.json @@ -1,23 +1,19 @@ { "capabilities": { - "bstack:options": { - "projectName": "Pytest Browserstack", - "buildName": "pytest-browserstack", - "sessionName": "single_test", - "local": false, - "debug" : "true", - "networkLogs": "true", - "seleniumVersion": "3.14.0" - } + "project": "Pytest Browserstack", + "build": "pytest-browserstack", + "name": "single_test", + "browserstack.local": false, + "browserstack.debug": "true", + "browserstack.networkLogs": "true", + "browserstack.selenium_version": "3.14.0" }, "environments": [ { - "bstack:options": { - "os": "Windows", - "osVersion": "11" - }, - "browserName": "chrome", - "browserVersion": "latest" + "os": "Windows", + "os_version": "11", + "browser": "Chrome", + "browser_version": "latest" } ] -} +} \ No newline at end of file diff --git a/conftest.py b/conftest.py index d22343e..63450c9 100644 --- a/conftest.py +++ b/conftest.py @@ -29,7 +29,7 @@ def stop_local(): @pytest.fixture(scope='session') def session_capabilities(): desired_capabilities = merge(CONFIG['environments'][TASK_ID],CONFIG["capabilities"]) - if "local" in desired_capabilities['bstack:options'] and desired_capabilities['bstack:options']['local']: + if "browserstack.local" in desired_capabilities and desired_capabilities['browserstack.local']: start_local() return desired_capabilities From e58c172f1fec167848384ea27eaa53ad9431777c Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Mon, 8 Aug 2022 14:28:33 +0530 Subject: [PATCH 02/13] removed: pprint import --- conftest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/conftest.py b/conftest.py index 63450c9..ac1c01f 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,3 @@ -from pprint import pprint import pytest from browserstack.local import Local import os, json From a3f9c9d83b9363e3d03b5be8a5cd9214444513d7 Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Wed, 10 Aug 2022 12:15:43 +0530 Subject: [PATCH 03/13] removed: selenium version --- config/local.json | 3 +-- config/parallel.json | 3 +-- config/single.json | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/local.json b/config/local.json index 2395852..1041683 100644 --- a/config/local.json +++ b/config/local.json @@ -5,8 +5,7 @@ "name": "local_test", "browserstack.local": true, "browserstack.debug": "true", - "browserstack.networkLogs": "true", - "browserstack.selenium_version": "3.14.0" + "browserstack.networkLogs": "true" }, "environments": [ { diff --git a/config/parallel.json b/config/parallel.json index e48558e..de39167 100644 --- a/config/parallel.json +++ b/config/parallel.json @@ -5,8 +5,7 @@ "name": "local_test", "browserstack.local": false, "browserstack.debug": "true", - "browserstack.networkLogs": "true", - "browserstack.selenium_version": "3.14.0" + "browserstack.networkLogs": "true" }, "environments": [ { diff --git a/config/single.json b/config/single.json index 214c247..8a5bfc5 100644 --- a/config/single.json +++ b/config/single.json @@ -5,8 +5,7 @@ "name": "single_test", "browserstack.local": false, "browserstack.debug": "true", - "browserstack.networkLogs": "true", - "browserstack.selenium_version": "3.14.0" + "browserstack.networkLogs": "true" }, "environments": [ { From b2bb9cb4b7c3c10df623ebe0969e870fbb809fbd Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Wed, 10 Aug 2022 12:20:29 +0530 Subject: [PATCH 04/13] update: Build name --- config/local.json | 2 +- config/parallel.json | 2 +- config/single.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/local.json b/config/local.json index 1041683..d86a82b 100644 --- a/config/local.json +++ b/config/local.json @@ -1,7 +1,7 @@ { "capabilities": { "project": "Pytest Browserstack", - "build": "pytest-browserstack", + "build": "browserstack-build-1", "name": "local_test", "browserstack.local": true, "browserstack.debug": "true", diff --git a/config/parallel.json b/config/parallel.json index de39167..5c5158a 100644 --- a/config/parallel.json +++ b/config/parallel.json @@ -1,7 +1,7 @@ { "capabilities": { "project": "Pytest Browserstack", - "build": "pytest-browserstack", + "build": "browserstack-build-1", "name": "local_test", "browserstack.local": false, "browserstack.debug": "true", diff --git a/config/single.json b/config/single.json index 8a5bfc5..640a5f4 100644 --- a/config/single.json +++ b/config/single.json @@ -1,7 +1,7 @@ { "capabilities": { "project": "Pytest Browserstack", - "build": "pytest-browserstack", + "build": "browserstack-build-1", "name": "single_test", "browserstack.local": false, "browserstack.debug": "true", From 70f4be6802d0d330065b74df033219fdc3a9921b Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Thu, 11 Aug 2022 12:11:27 +0530 Subject: [PATCH 05/13] add: EOF update: selenium==3.141.0 --- config/local.json | 2 +- config/parallel.json | 2 +- config/single.json | 2 +- requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/local.json b/config/local.json index d86a82b..61f0f0f 100644 --- a/config/local.json +++ b/config/local.json @@ -15,4 +15,4 @@ "browser_version": "latest" } ] -} \ No newline at end of file +} diff --git a/config/parallel.json b/config/parallel.json index 5c5158a..8342966 100644 --- a/config/parallel.json +++ b/config/parallel.json @@ -25,4 +25,4 @@ "device": "Samsung Galaxy S20" } ] -} \ No newline at end of file +} diff --git a/config/single.json b/config/single.json index 640a5f4..059f8d5 100644 --- a/config/single.json +++ b/config/single.json @@ -15,4 +15,4 @@ "browser_version": "latest" } ] -} \ No newline at end of file +} diff --git a/requirements.txt b/requirements.txt index 408bf8b..64cf362 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ browserstack-local jsonmerge multiprocess paver -selenium +selenium==3.141.0 psutil pytest pytest-variables From f6f548fa2e0fba0f738e7e794ee9bced345e05f8 Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Thu, 11 Aug 2022 12:13:04 +0530 Subject: [PATCH 06/13] update: name --- config/local.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/local.json b/config/local.json index 61f0f0f..753dac8 100644 --- a/config/local.json +++ b/config/local.json @@ -2,7 +2,7 @@ "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "local_test", + "name": "BStack pytest local", "browserstack.local": true, "browserstack.debug": "true", "browserstack.networkLogs": "true" From 547501e86f3fc910e34bbe98217b369d900c92da Mon Sep 17 00:00:00 2001 From: Ankit Singh <51696887+Ankit098@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:27:26 +0530 Subject: [PATCH 07/13] chore: update sample test names --- config/parallel.json | 2 +- config/single.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/parallel.json b/config/parallel.json index 8342966..0bc4a24 100644 --- a/config/parallel.json +++ b/config/parallel.json @@ -2,7 +2,7 @@ "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "local_test", + "name": "BStack pytest parallel", "browserstack.local": false, "browserstack.debug": "true", "browserstack.networkLogs": "true" diff --git a/config/single.json b/config/single.json index 059f8d5..b9de3f3 100644 --- a/config/single.json +++ b/config/single.json @@ -2,7 +2,7 @@ "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "single_test", + "name": "BStack pytest single", "browserstack.local": false, "browserstack.debug": "true", "browserstack.networkLogs": "true" From dd8a99cb597c02614b4e516f996c36f9ad275dae Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Mon, 5 Sep 2022 20:30:42 +0530 Subject: [PATCH 08/13] update: requested changes --- README.md | 9 +++--- config/local.json | 34 ++++++++++++---------- config/{parallel.json => sample.json} | 4 ++- config/single.json | 18 ------------ conftest.py | 11 ++++--- pavement.py | 7 ----- tests/{test_parallel.py => test_sample.py} | 0 tests/test_single.py | 25 ---------------- 8 files changed, 32 insertions(+), 76 deletions(-) rename config/{parallel.json => sample.json} (85%) delete mode 100644 config/single.json rename tests/{test_parallel.py => test_sample.py} (100%) delete mode 100644 tests/test_single.py diff --git a/README.md b/README.md index 2c01399..c55f769 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ PyTest Integration with BrowserStack. ![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780) +## Prerequisite +* Python3 ## Setup @@ -10,19 +12,16 @@ PyTest Integration with BrowserStack. * Install dependencies `pip install -r requirements.txt` * To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done either by using a .browserstack configuration file in the working directory or your home directory, or by setting the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables. -## Running your single tests -* To run single tests, run `paver run single` ## Running your local tests * To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to conftest.py then edit access_key on line 10 * Run `paver run local` -## Running your parallel tests -* To run parallel tests, run `paver run parallel` +## Running your sample tests +* To run parallel tests, run `paver run sample` Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github) ## Notes * You can view your test results on the [BrowserStack Automate dashboard](https://www.browserstack.com/automate) * To test on a different set of browsers, check out our [platform configurator](https://www.browserstack.com/automate/python#setting-os-and-browser) - diff --git a/config/local.json b/config/local.json index 753dac8..3110912 100644 --- a/config/local.json +++ b/config/local.json @@ -1,18 +1,20 @@ { - "capabilities": { - "project": "Pytest Browserstack", - "build": "browserstack-build-1", - "name": "BStack pytest local", - "browserstack.local": true, - "browserstack.debug": "true", - "browserstack.networkLogs": "true" - }, - "environments": [ - { - "os": "Windows", - "os_version": "11", - "browser": "Chrome", - "browser_version": "latest" - } - ] + "user": "BROWSERSTACK_USERNAME", + "key": "BROWSERSTACK_ACCESS_KEY", + "capabilities": { + "project": "Pytest Browserstack", + "build": "browserstack-build-1", + "name": "BStack pytest local", + "browserstack.local": true, + "browserstack.debug": "true", + "browserstack.networkLogs": "true" + }, + "environments": [ + { + "os": "Windows", + "os_version": "11", + "browser": "Chrome", + "browser_version": "latest" + } + ] } diff --git a/config/parallel.json b/config/sample.json similarity index 85% rename from config/parallel.json rename to config/sample.json index 8342966..ae4b305 100644 --- a/config/parallel.json +++ b/config/sample.json @@ -1,8 +1,10 @@ { + "user":"BROWSERSTACK_USERNAME", + "key":"BROWSERSTACK_ACCESS_KEY", "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "local_test", + "name": "BStack pytest sample", "browserstack.local": false, "browserstack.debug": "true", "browserstack.networkLogs": "true" diff --git a/config/single.json b/config/single.json deleted file mode 100644 index 059f8d5..0000000 --- a/config/single.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "capabilities": { - "project": "Pytest Browserstack", - "build": "browserstack-build-1", - "name": "single_test", - "browserstack.local": false, - "browserstack.debug": "true", - "browserstack.networkLogs": "true" - }, - "environments": [ - { - "os": "Windows", - "os_version": "11", - "browser": "Chrome", - "browser_version": "latest" - } - ] -} diff --git a/conftest.py b/conftest.py index ac1c01f..f124709 100644 --- a/conftest.py +++ b/conftest.py @@ -10,7 +10,8 @@ bs_local = None -BROWSERSTACK_ACCESS_KEY = os.environ['BROWSERSTACK_ACCESS_KEY'] if 'BROWSERSTACK_ACCESS_KEY' in os.environ else None +BROWSERSTACK_USERNAME = os.environ['BROWSERSTACK_USERNAME'] if 'BROWSERSTACK_USERNAME' in os.environ else CONFIG["user"] +BROWSERSTACK_ACCESS_KEY = os.environ['BROWSERSTACK_ACCESS_KEY'] if 'BROWSERSTACK_ACCESS_KEY' in os.environ else CONFIG["key"] def start_local(): """Code to start browserstack local before start of test.""" @@ -27,10 +28,12 @@ def stop_local(): @pytest.fixture(scope='session') def session_capabilities(): - desired_capabilities = merge(CONFIG['environments'][TASK_ID],CONFIG["capabilities"]) - if "browserstack.local" in desired_capabilities and desired_capabilities['browserstack.local']: + capabilities = merge(CONFIG['environments'][TASK_ID],CONFIG["capabilities"]) + capabilities['browserstack.user'] = BROWSERSTACK_USERNAME + capabilities['browserstack.key'] = BROWSERSTACK_ACCESS_KEY + if "browserstack.local" in capabilities and capabilities['browserstack.local']: start_local() - return desired_capabilities + return capabilities def pytest_sessionfinish(session, exitstatus): diff --git a/pavement.py b/pavement.py index 472bf96..3accb7c 100644 --- a/pavement.py +++ b/pavement.py @@ -35,10 +35,3 @@ def run(args): p = Process(target=run_py_test, args=(args[0], i)) jobs.append(p) p.start() - -@task -def test(): - """Run all tests""" - sh("paver run single") - sh("paver run local") - sh("paver run parallel") diff --git a/tests/test_parallel.py b/tests/test_sample.py similarity index 100% rename from tests/test_parallel.py rename to tests/test_sample.py diff --git a/tests/test_single.py b/tests/test_single.py deleted file mode 100644 index 7ba9692..0000000 --- a/tests/test_single.py +++ /dev/null @@ -1,25 +0,0 @@ -from browserstack.local import Local -from selenium import webdriver -import pytest -from selenium.webdriver.common.by import By - -def test_example(selenium): - selenium.get('https://bstackdemo.com/') - - # locating product on webpage and getting name of the product - productText = selenium.find_element(By.XPATH, '//*[@id="1"]/p').text - - # clicking the 'Add to cart' button - selenium.find_element(By.XPATH, '//*[@id="1"]/div[4]').click() - - # waiting until the Cart pane has been displayed on the webpage - selenium.find_element(By.CLASS_NAME, 'float-cart__content') - - # locating product in cart and getting name of the product in cart - productCartText = selenium.find_element(By.XPATH, '//*[@id="__next"]/div/div/div[2]/div[2]/div[2]/div/div[3]/p[1]').text - - # checking whether product has been added to cart by comparing product name and marking test pass or fail - if productText == productCartText: - selenium.execute_script('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"passed","reason": "Test Passed Successfully"}}') - else: - selenium.execute_script('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"failed","reason": "Product added to the cart not same as selected"}}') From 67ab83344bdf5f92beaf8347643a8cef16cf45c7 Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Mon, 5 Sep 2022 22:29:05 +0530 Subject: [PATCH 09/13] update: Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c55f769..ca740e5 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ PyTest Integration with BrowserStack. * To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done either by using a .browserstack configuration file in the working directory or your home directory, or by setting the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables. -## Running your local tests +## Run tests on locally hosted websites * To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to conftest.py then edit access_key on line 10 * Run `paver run local` From 1696343f2ffb772f6a41800bac46382a5ed7358f Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Mon, 5 Sep 2022 22:32:23 +0530 Subject: [PATCH 10/13] update: readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca740e5..f275b20 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ PyTest Integration with BrowserStack. * Clone the repo * Install dependencies `pip install -r requirements.txt` -* To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done either by using a .browserstack configuration file in the working directory or your home directory, or by setting the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables. +* To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done either by using a .browserstack configuration file in the working directory or your home directory, by setting the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables, or by adding user & key to config file. ## Run tests on locally hosted websites -* To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to conftest.py then edit access_key on line 10 +* To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to config/local.json then edit key on line 3 * Run `paver run local` ## Running your sample tests From ec73bf2587e2b7f5806b89bdfec58cc457a62f72 Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Tue, 6 Sep 2022 17:03:41 +0530 Subject: [PATCH 11/13] update: README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f275b20..3acfb98 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ PyTest Integration with BrowserStack. * To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to config/local.json then edit key on line 3 * Run `paver run local` -## Running your sample tests +## Run your sample tests * To run parallel tests, run `paver run sample` Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github) From 4971276487ca1844242d57ea54d2733e9c659f0d Mon Sep 17 00:00:00 2001 From: Rushabh Shroff Date: Tue, 6 Sep 2022 17:05:35 +0530 Subject: [PATCH 12/13] update: Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3acfb98..59795ee 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ PyTest Integration with BrowserStack. * To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to config/local.json then edit key on line 3 * Run `paver run local` -## Run your sample tests +## Run sample tests * To run parallel tests, run `paver run sample` Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github) From f3b490c81ad49e40ec2ee4634afc0eb2b296476d Mon Sep 17 00:00:00 2001 From: Karan Shah <64479353+karanshah-browserstack@users.noreply.github.com> Date: Mon, 3 Oct 2022 19:48:58 +0530 Subject: [PATCH 13/13] Adding source to capabilities --- config/local.json | 2 +- config/sample.json | 2 +- conftest.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/local.json b/config/local.json index 3110912..da87635 100644 --- a/config/local.json +++ b/config/local.json @@ -4,7 +4,7 @@ "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "BStack pytest local", + "name": "BStack local pytest", "browserstack.local": true, "browserstack.debug": "true", "browserstack.networkLogs": "true" diff --git a/config/sample.json b/config/sample.json index ae4b305..4c89764 100644 --- a/config/sample.json +++ b/config/sample.json @@ -4,7 +4,7 @@ "capabilities": { "project": "Pytest Browserstack", "build": "browserstack-build-1", - "name": "BStack pytest sample", + "name": "BStack sample pytest", "browserstack.local": false, "browserstack.debug": "true", "browserstack.networkLogs": "true" diff --git a/conftest.py b/conftest.py index f124709..c59b077 100644 --- a/conftest.py +++ b/conftest.py @@ -31,6 +31,7 @@ def session_capabilities(): capabilities = merge(CONFIG['environments'][TASK_ID],CONFIG["capabilities"]) capabilities['browserstack.user'] = BROWSERSTACK_USERNAME capabilities['browserstack.key'] = BROWSERSTACK_ACCESS_KEY + capabilities['browserstack.source'] = 'pytest:sample-selenium-3:v1.0' if "browserstack.local" in capabilities and capabilities['browserstack.local']: start_local() return capabilities