Skip to content

Commit 64268d0

Browse files
committed
Mention that unit tests have dependencies in utest/README.rst.
Also move copyright/license text to the end.
1 parent d5af866 commit 64268d0

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

utest/README.rst

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Introduction
55
------------
66

77
Robot Framework's unit tests are implemented using Python's `unittest
8-
<https://docs.python.org/2/library/unittest.html>`__ module, and they
8+
<https://docs.python.org/library/unittest.html>`__ module, and they
99
all are in subdirectories of this directory. These tests are executed
1010
automatically when all acceptance tests are executed, and how to run
1111
unit tests manually is explained below.
@@ -16,6 +16,33 @@ better implemented as unit tests, but we want to push the framework to
1616
its limits (and eat our own dog food). A consequence to this is that
1717
some features are not unit tested at all.
1818

19+
Running unit tests
20+
------------------
21+
22+
All unit tests can be run with script ``run.py``. To get more
23+
information run ``python run.py --help``. It can be executed with
24+
Python, Jython and IronPython to verify interoperability with all supported
25+
interpreters.
26+
27+
Unit test files should always start with prefix ``test_``. This is the
28+
mechanism the unit tests are found by the ``run.py`` script.
29+
30+
To run only certain unit tests you need to set the Robot Framework's ``src``
31+
folder to ``PYTHONPATH`` and run the test like ``python path/test_xxx.py``.
32+
There are also some unit tests that need some other modules i.e. libraries
33+
used also in acceptance tests. The full list of paths needed to run all
34+
the unit tests can be found from the beginning of the ``run.py`` file.
35+
Often it is just easier to run all the unit tests.
36+
37+
Preconditions
38+
-------------
39+
40+
Depending on the platform, unit tests may need some external modules to be
41+
installed. Needed modules are is listed in the provided `<requirements.txt>`__
42+
file and the easiest way to install them is running::
43+
44+
pip install -r utest/requirements.txt
45+
1946
License and copyright
2047
---------------------
2148

@@ -36,20 +63,3 @@ All content in the ``utest`` directory is under the following copyright::
3663
See the License for the specific language governing permissions and
3764
limitations under the License.
3865

39-
Running unit tests
40-
------------------
41-
42-
All unit tests can be run with script ``run.py``. To get more
43-
information run ``python run.py --help``. It can be executed with
44-
Python, Jython and IronPython to verify interoperability with all supported
45-
interpreters.
46-
47-
Unit test files should always start with prefix ``test_``. This is the
48-
mechanism the unit tests are found by the ``run.py`` script.
49-
50-
To run only certain unit tests you need to set the Robot Framework's ``src``
51-
folder to ``PYTHONPATH`` and run the test like ``python path/test_xxx.py``.
52-
There are also some unit tests that need some other modules i.e. libraries
53-
used also in acceptance tests. The full list of paths needed to run all
54-
the unit tests can be found from the beginning of the ``run.py`` file.
55-
Often it is just easier to run all the unit tests.

0 commit comments

Comments
 (0)