You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(A Git GUI tool like [SourceTree](http://www.sourcetreeapp.com/) may make things easier.)
122
122
123
123
124
-
### **Step 2:** Create a virtual environment
124
+
### **Step 2:** Create a Virtual Environment
125
125
126
126
If you're not sure how, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md)**. For an overview of virtual environments and why you should use them, **[click here](http://docs.python-guide.org/en/latest/dev/virtualenvs/)**.
127
127
128
128
129
129
### **Step 3:** Install SeleniumBase
130
130
131
-
Since [SeleniumBase is in Pypi](https://pypi.python.org/pypi/seleniumbase), you can install it like this: (Using ``"sudo"`` may be required.)
131
+
To install SeleniumBase from the [Python Package Index](https://pypi.python.org/pypi/seleniumbase) use:
132
132
```bash
133
133
pip install seleniumbase --upgrade
134
134
```
135
135
136
-
You can also customize your local version of SeleniumBase. If you change the Python requirements or make any changes to the SeleniumBase library files, just run the following commands from the SeleniumBase top-level directory for your changes to take effect:
137
-
136
+
To install your local customized version of SeleniumBase use:
138
137
```bash
139
138
pip install -r requirements.txt --upgrade
140
-
```
141
139
142
-
```bash
143
140
python setup.py install
144
141
```
145
142
146
-
If you wish to use the MySQL functionality with SeleniumBase to store test results and data in the database, you'll need to [follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mysql_installation.md).
147
-
148
143
149
144
<aid="seleniumbase_basic_usage"></a>
150
-
### **Step 4:** Run the example script
145
+
### **Step 4:** Run the Example Script
151
146
152
147
**Here's what the example script looks like:**
153
148
@@ -177,7 +172,7 @@ class MyTestClass(BaseCase):
177
172
178
173
**Here's how to run the example script on various web browsers by using nosetests:**
179
174
180
-
(NOTE: You can interchange **nosetests** with **py.test**[as seen here](#pytest_basic_usage).)
175
+
(NOTE: You can interchange **nosetests** with **pytest**[as seen here](#pytest_basic_usage).)
181
176
182
177
```bash
183
178
cd examples/
@@ -238,20 +233,20 @@ Here are some other useful nosetest arguments that you may want to append to you
238
233
239
234
240
235
<aid="pytest_basic_usage"></a>
241
-
Here's how to run the example script with **py.test**:
236
+
Here's how to run the example script with **pytest**:
(NOTE: The ``--with-testing_base`` plugin gives you full logging on test failures, which saves screenshots, page source, and basic test info into the logs folder.)
253
248
254
-
(NOTE: If you're using **pytest** instead nosetests for running your own integration tests outside of the SeleniumBase file path, **you'll need a copy of [conftest.py](https://github.com/seleniumbase/SeleniumBase/blob/master/conftest.py)inside your folder structure** because the pytest configuration is defined there locally at runtime.)
249
+
(NOTE: If you're using **pytest** instead of nosetests for running tests outside of the SeleniumBase repo, **you'll need a copy of [conftest.py](https://github.com/seleniumbase/SeleniumBase/blob/master/conftest.py)at the base of the new folder structure** because the pytest configuration is defined there locally at runtime. You'll also want a copy of [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini) there too.)
255
250
256
251
257
252
<aid="how_seleniumbase_works"></a>
@@ -298,7 +293,7 @@ Here are some things you can do to setup a production environment for your testi
298
293
299
294
* There are ways of running your tests from Jenkins without having to utilize a remote machine. One way is by using PhantomJS as your browser (it runs headlessly). Another way is by using Xvfb (another headless system). [There's a plugin for Xvfb in Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin). If you have Xvfb running in the background, you can add ``--headless`` to your run command in order to utilize it. For information about the Xvfb plugin for Jenkins, [click here](http://qxf2.com/blog/xvfb-plugin-for-jenkins-selenium/). To see a real-world Jenkins example of headless browser automation in action, [check out the SeleniumBase Google Cloud ReadMe](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md), which covers this topic with screenshots.
300
295
301
-
* If you're using the [SeleniumBase MySQL feature](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mysql_installation.md) to save test results from test runs, you can install [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) to help you read & write from your DB more easily.
296
+
* If you're using the [SeleniumBase MySQL feature](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mysql_installation.md) to save results from tests running on a server machine, you can install [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) to help you read & write from your DB more easily.
302
297
303
298
* If you're using AWS, you can setup an [Amazon S3](http://aws.amazon.com/s3/) account for saving your log files and screenshots for future viewing. SeleniumBase already has all the code you need to connect to it. (You'll need to modify [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) with connection details to your instance and the location in S3 where you want log files to be saved.)
0 commit comments