Skip to content

Commit 2c2eb09

Browse files
committed
Update Docs
1 parent 931f56a commit 2c2eb09

File tree

6 files changed

+55
-16
lines changed

6 files changed

+55
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SeleniumBase
22
[![pypi](https://img.shields.io/pypi/v/seleniumbase.svg)](https://pypi.python.org/pypi/seleniumbase) [![Build Status](https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master)](https://travis-ci.org/seleniumbase/SeleniumBase) [![Python version](https://img.shields.io/badge/python-2.7,_3.*-22AADD.svg "Python version")](https://docs.python.org/2/) [![MIT License](http://img.shields.io/badge/license-MIT-22BBCC.svg "MIT License")](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [![Join the chat at https://gitter.im/seleniumbase/SeleniumBase](https://badges.gitter.im/seleniumbase/SeleniumBase.svg)](https://gitter.im/seleniumbase/SeleniumBase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub stars](https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg "GitHub stars")](https://github.com/seleniumbase/SeleniumBase/stargazers)
33

4-
Fast & reliable test automation. Runs with [Pytest](https://docs.pytest.org/en/latest/) & [Nosetests](http://nose.readthedocs.io/en/latest/). [Jenkins](https://jenkins.io/)-friendly.
4+
Reliable test automation. [Built-in logging & reports](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/example_logs). Runs with [Pytest](https://docs.pytest.org/en/latest/) or [Nosetest](http://nose.readthedocs.io/en/latest/).
55

66
<b>Simple [Python](https://www.python.org/) code speeds development:</b><br>
77

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
theme: jekyll-theme-cayman
22
title: SeleniumBase
3-
description: Test Automation for The Web has evolved
3+
description: The missing test framework for Selenium

examples/example_logs/ReadMe.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
### Logging & Reports Tutorial
2+
3+
The log files you see in this folder were generated when [test_fail.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_fail.py) ran and failed with logging turned on. (Include ``--with-testing_base`` on the command line in your test runs.) By default, a folder named ``latest_logs/`` will appear in the location where you ran the tests. If you have ARCHIVE_EXISTING_LOGS set to True in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py), past logs will get moved to the ``archived_logs/`` folder instead of getting deleted.
4+
5+
**Usage examples:**
6+
```bash
7+
pytest test_fail.py --with-testing_base --browser=chrome
8+
9+
nosetests test_fail.py --with-selenium --with-testing_base --browser=firefox
10+
```
11+
12+
**Expected log files generated during failures:**
13+
[basic_test_info.txt](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/basic_test_info.txt)
14+
[page_source.html](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/page_source.html)
15+
[screenshot.png](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/screenshot.png)
16+
17+
---
18+
**In addition to logging, you can also generate test reports:**
19+
20+
Reports are most useful when running large test suites. Pytest and Nosetest reports are handled differently.
21+
22+
#### **Pytest Reports:**
23+
24+
Using ``--html=report.html`` gives you a fancy report of the name specified after your test suite completes.
25+
26+
```bash
27+
pytest my_test_suite.py --with-selenium --html=report.html
28+
```
29+
![](https://cdn2.hubspot.net/hubfs/100006/images/PytestReport.png "Example Pytest Report")
30+
31+
#### **Nosetest Reports:**
32+
33+
The ``--report`` option gives you a fancy report after your test suite completes. (Requires ``--with-testing_base`` to also be set when ``--report`` is used because it's part of that plugin.)
34+
35+
```bash
36+
nosetests my_test_suite.py --with-selenium --with-testing_base --report --browser=chrome
37+
```
38+
![](http://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png "Example Nosetest Report")
39+
40+
(NOTE: You can add ``--show_report`` to immediately display the report after the test suite completes. You don't want to use this when running tests remotely because otherwise the test run will hang indefinitely until someone manually exits the report.)

examples/example_logs/ReadMe.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

help_docs/features_list.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<a id="feature_list"></a>
22
### ![http://seleniumbase.com](https://cdn2.hubspot.net/hubfs/100006/images/super_logo_tiny.png "SeleniumBase") **SeleniumBase Features:**
33
* A versatile test automation framework for building & running reliable Selenium scripts.
4-
* A hybrid-automation solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)** for speeding up manual testing.
5-
* [Python libraries](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase) for helping you do more with Selenium-WebDriver.
6-
* A flexible command line interface for customizing test runs.
7-
* [Plugins](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/plugins) for logging [data and screenshots](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/example_logs) automatically.
8-
* [A global config file](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) for making SeleniumBase unique to your specific environmental needs.
9-
* Easy integration with [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_grid), [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js).
4+
* Run tests locally, from [Jenkins](https://jenkins.io/) headlessly, or remotely with [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_grid).
5+
* Uses a flexible command line interface for customizing test runs.
6+
* Has [Python libraries](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase) for helping you do more with Selenium-WebDriver.
7+
* Has [Plugins](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/plugins) for logging [data and screenshots](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/example_logs) automatically.
8+
* Uses a [global config file](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) for making SeleniumBase unique to your specific environmental needs.
9+
* Includes a hybrid-automation solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)** to speed up manual testing.
10+
* Includes integrations with [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js).
1011
* Backwards-compatible with [WebDriver](http://www.seleniumhq.org/projects/webdriver/). (Use ``self.driver`` anywhere.)
11-
* [A tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_ide) into clean & reliable SeleniumBase scripts.
12+
* Includes a [tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_ide) into clean & reliable SeleniumBase scripts.

integrations/selenium_grid/ReadMe.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Now you can add a Grid Node to the Grid Hub:
1616
```bash
1717
./grid-node start
1818
```
19-
(NOTE: If the Grid Node is not running on the same machine as the Grid Hub, update the address from the script.)
19+
(NOTE: If the Grid Node is not running on the same machine as the Grid Hub, update the address listed for WEBDRIVER_NODE_PARAMS in the [grid-node](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_grid/grid-node) script.)
2020
You should be able to see the Grid Console up and running from here: [http://0.0.0.0:4444/grid/console](http://0.0.0.0:4444/grid/console) (NOTE: That's the address if you're running locally from localhost.)
2121

2222
You can remove a Grid Node from the Grid Hub with:
@@ -28,6 +28,10 @@ You can stop the Grid Hub at anytime with:
2828
./grid-hub stop
2929
```
3030

31+
When running with nosetests, configure a "``setup.cfg``" file with your grid hub info. (See the example [selenium_server_config_example.cfg](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_grid/selenium_server_config_example.cfg) file.)
32+
33+
When running with pytest, add the server and port info to a "``pytest.ini``" file. (Or add that data directly on the command line when you run your tests.)
34+
3135
#### More detailed info about connecting to the Selenium Grid Hub can be found here:
3236
* [https://theintern.github.io/intern/#selenium-grid](https://theintern.github.io/intern/#selenium-grid)
3337
* [https://github.com/SeleniumHQ/selenium/wiki/Grid2](https://github.com/SeleniumHQ/selenium/wiki/Grid2)

0 commit comments

Comments
 (0)