Skip to content

Commit d2c6204

Browse files
committed
Update ReadMe on running example scripts
1 parent 101923d commit d2c6204

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

examples/ReadMe.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
The python tests here are in nosetest format, which means that you CANNOT run them by using “python [NAME OF .PY FILE]” in the command prompt. To make running these files easy, .sh files have been created. Those contain the run commands to properly execute the python tests.
2-
3-
On a MAC or Unix-based system, you can execute .sh files by using ./[NAME OF .SH FILE] in a command prompt from the folder that the .sh files are located in. On a Windows-based system .bat files work the same way. You can switch the file extensions from .sh to .bat if you need to. One .bat file has been included in this folder.
4-
5-
You may have trouble opening .cfg files if you want to try viewing/editing them because the file extension may be unrecognized on your system. If so, use the Right-Click “Open With” option, or just drag & drop the file into a text-editing program.
6-
7-
If you run scripts with logging enabled, you’ll see two folders appear: “logs” and “archived logs”. The “logs” folder will contain log files from the most recent test run, but logs will only be created if the test run is failing. Afterwards, logs from the “logs” folder will get pushed to the “archived_logs” folder.
8-
9-
You may also see .pyc files appear as you run tests. That’s compiled bytecode, which is a natural result of running Python code.
1+
#### Running SeleniumBase Scripts
102

113
Here are some example run commands for the files in this folder and what they do:
124
(Note: You can replace ``nosetests`` with ``py.test`` for any of these.)
@@ -36,6 +28,11 @@ Example test with the use of python decorators
3628
nosetests rate_limiting_test.py
3729
```
3830

31+
Run the example test slowly
32+
```bash
33+
nosetests my_first_test.py --browser=firefox --with-selenium --demo_mode
34+
```
35+
3936
Run a failing test with pdb mode enabled (If a test failure occurs, test enters pdb mode)
4037
```bash
4138
nosetests test_fail.py --browser=firefox --with-selenium --pdb --pdb-failures
@@ -44,4 +41,8 @@ nosetests test_fail.py --browser=firefox --with-selenium --pdb --pdb-failures
4441
Run a failing test with logging
4542
```bash
4643
nosetests test_fail.py --browser=firefox --with-selenium --with-testing_base --with-basic_test_info --with-page_source --with-screen_shots
47-
```
44+
```
45+
46+
If you run scripts with logging enabled, you’ll see two folders appear: “logs” and “archived logs”. The “logs” folder will contain log files from the most recent test run, but logs will only be created if the test run is failing. Afterwards, logs from the “logs” folder will get pushed to the “archived_logs” folder.
47+
48+
You may also see .pyc files appear as you run tests. That’s compiled bytecode, which is a natural result of running Python code.

0 commit comments

Comments
 (0)