Skip to content

Commit 2011a15

Browse files
authored
Merge pull request #220 from seleniumbase/update-docs
Update the docs to include details on connecting to BrowserStack
2 parents ddcf39b + a809de9 commit 2011a15

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

help_docs/customizing_test_runs.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/m
88
* Choose additional variables to pass into tests
99
* Change the automation speed (with Demo Mode)
1010
* Choose whether to run tests multi-threaded
11+
* Choose a BrowserStack server to run on
1112
* Choose a Selenium Grid to connect to
1213
* Choose a database to save results to
1314
* Choose a proxy server to connect to
@@ -29,7 +30,9 @@ pytest my_test_suite.py --html=report.html
2930

3031
nosetests my_test_suite.py --report --show_report
3132

32-
pytest my_test_suite.py --server=IP_ADDRESS -n 4
33+
pytest my_test_suite.py --headless -n 4
34+
35+
pytest my_test_suite.py --server=IP_ADDRESS --port=4444
3336

3437
pytest my_test_suite.py --proxy=IP_ADDRESS:PORT
3538

@@ -40,6 +43,16 @@ You can interchange **pytest** with **nosetests**, but using pytest is strongly
4043

4144
(NOTE: If you're using **pytest** for running tests outside of the SeleniumBase repo, **you'll want a copy of [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini) at the base of the new folder structure**. If using **nosetests**, the same applies for [setup.cfg](https://github.com/seleniumbase/SeleniumBase/blob/master/setup.cfg).)
4245

46+
#### **Running tests on [BrowserStack](https://www.browserstack.com/automate#)'s Selenium Grid (or your own):**
47+
48+
Here's how to connect to a BrowserStack server for running tests:
49+
50+
```bash
51+
pytest my_first_test.py --server=username:[email protected] --port=80
52+
```
53+
54+
Or you can create your own Selenium Grid for test distribution. ([See this ReadMe for details](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md))
55+
4356
#### **Example tests using Logging:**
4457

4558
```bash

seleniumbase/utilities/selenium_grid/ReadMe.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ Options:
2323

2424
When the Grid Hub Console is up and running, you'll be able to find it here: [http://127.0.0.1:4444/grid/console](http://127.0.0.1:4444/grid/console)
2525

26+
Now you can run your tests on the Selenium Grid:
27+
28+
```
29+
pytest my_test_suite.py --server=IP_ADDRESS --port=4444
30+
```
31+
32+
You can also run your tests on [BrowserStack](https://www.browserstack.com/automate#)'s Selenium Grid (and not worry about managing your own Selenium Grid):
33+
34+
```
35+
pytest my_first_test.py --server=username:[email protected] --port=80
36+
```
37+
2638

2739
#### More info about the Selenium Grid Hub can be found here:
2840
* [https://github.com/SeleniumHQ/selenium/wiki/Grid2](https://github.com/SeleniumHQ/selenium/wiki/Grid2)

0 commit comments

Comments
 (0)