Skip to content

Commit fa9f78a

Browse files
committed
Update help docs
1 parent 9ab39fa commit fa9f78a

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

help_docs/command_line.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,18 @@ In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/m
1616
**Examples:** (These are run from the **[examples](https://github.com/seleniumbase/SeleniumBase/tree/master/examples)** folder.):
1717

1818
```bash
19-
pytest my_first_test.py --browser=chrome
19+
pytest my_first_test.py
2020

21-
nosetests my_first_test.py --with-selenium --demo_mode --browser=firefox
22-
```
23-
(<i>The Selenium plugin, ``--with-selenium``, is enabled by default when using pytest to run test classes that inherit the [BaseCase](#seleniumbase_basic_usage) class, thanks to [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini). You can do the same for nosetests by adding ``with-selenium=1`` under ``[nosetests]`` in a [setup.cfg](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/setup.cfg) file located in the folder where you call nosetests.</i>)
24-
25-
**Here's how to run the example script on various web browsers by using nosetests:**
26-
27-
(NOTE: You can interchange **nosetests** with **pytest**.)
28-
29-
```bash
30-
cd examples/
31-
32-
nosetests my_first_test.py --with-selenium --browser=chrome
21+
nosetests my_first_test.py --browser=firefox
3322

34-
nosetests my_first_test.py --with-selenium --browser=firefox
23+
pytest my_first_test.py --demo_mode --browser=chrome
3524

36-
nosetests my_first_test.py --with-selenium --browser=phantomjs
25+
nosetests my_test_suite.py --with-testing_base -s
3726
```
38-
After the test completes, in the console output you'll see a dot (``.``) on a new line, representing a passing test. (On test failures you'll see an ``F`` instead, and on test errors you'll see an ``E``). It looks more like a moving progress bar when you're running a ton of unit tests side by side. This is part of nosetests. After all tests complete (in this case there is only one), you'll see the "``Ran 1 test in ...``" line, followed by an "``OK``" if all nosetests passed. The ``--with-selenium`` option is required for running GUI tests with nosetests (not needed when using pytest). If no browser is specified, Chrome will become the default. The ``-s`` option is optional, and that makes sure that any standard output is printed immediately on the command line when tests have print statements in them, which makes debugging much easier.
3927

40-
**Here's how to run the example script using pytest**:
28+
You can interchange **nosetests** with **pytest**. Chrome is the default browser if not specified. The ``-s`` option may produce additional output to make debugging easier.
4129

42-
```bash
43-
cd examples/
44-
45-
pytest my_first_test.py --browser=firefox
46-
47-
pytest my_first_test.py --browser=chrome
48-
49-
pytest my_first_test.py --browser=phantomjs
50-
```
51-
(NOTE: If you're using **pytest** instead of nosetests for running tests outside of the SeleniumBase repo, **you'll need a copy of [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini) at the base of the new folder structure**, already provided here.
30+
(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).)
5231

5332
**Example tests using Logging**:
5433
```bash

0 commit comments

Comments
 (0)