@@ -5,7 +5,7 @@ Introduction
5
5
------------
6
6
7
7
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
9
9
all are in subdirectories of this directory. These tests are executed
10
10
automatically when all acceptance tests are executed, and how to run
11
11
unit tests manually is explained below.
@@ -16,6 +16,33 @@ better implemented as unit tests, but we want to push the framework to
16
16
its limits (and eat our own dog food). A consequence to this is that
17
17
some features are not unit tested at all.
18
18
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
+
19
46
License and copyright
20
47
---------------------
21
48
@@ -36,20 +63,3 @@ All content in the ``utest`` directory is under the following copyright::
36
63
See the License for the specific language governing permissions and
37
64
limitations under the License.
38
65
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