@@ -2,35 +2,38 @@ Remote server example
2
2
=====================
3
3
4
4
This directory contains a very simple remote library example in
5
- `<examplelibrary.py >`__ file and tests using it in `<example_tests .robot >`__
6
- file. The example library can be executed with Python, Jython, and IronPython.
7
- Also tests can be run with any of these interpreters, independently from
8
- the interpreter used for executing the library.
5
+ `<examplelibrary.py >`__ file and tests using it in `<tests .robot >`__
6
+ file. The example library can be executed with Python (both 2 and 3), Jython,
7
+ IronPython or PyPy. Also tests can be run with any of these interpreters,
8
+ independently from the interpreter used for executing the library.
9
9
10
10
A precondition to running the example is installing the remote server or
11
- putting it into PYTHONPATH or equivalent otherwise. After that the remote
11
+ putting it into `` PYTHONPATH `` or equivalent otherwise. After that the remote
12
12
library can be started from the command line by just executing it with
13
13
the selected interpreter::
14
14
15
- python examplelibrary.py # Execute on Python
16
- jython examplelibrary.py # Execute on Jython
17
- ipy examplelibrary.py # Execute on IronPython
15
+ python examplelibrary.py # Start library on Python
16
+ jython examplelibrary.py # Start library on Jython
18
17
19
- Alternatively the library can be double-clicked on a file manager. In that
20
- case it will run on Python .
18
+ Depending on the operating system configuration, it may also be possible to
19
+ simply double-click the library on a file manager .
21
20
22
21
After the library is running, tests can be executed normally::
23
22
24
- pybot example_tests.robot # Execute with Python
25
- jybot example_tests.robot # Execute with Jython
26
- ipy example_tests.robot # Execute with IronPython
23
+ robot tests.robot # Execute with the `robot` command
24
+ pypy -m robot tests.robot # Execute `robot` module using PyPy
27
25
28
- It is possible to use custom address and port by passing them as arguments
29
- to the library, which passes them further to the remote server, and overriding
30
- related variables when running tests::
26
+ My default the library starts to listen on connections from the localhost on
27
+ port 8270. Both the address and the port to listen to can be configured with
28
+ command line arguments to the library, and also given as variables to tests
29
+ that are run::
31
30
32
- python examplelibrary.py 0.0.0.0 7777
33
- pybot --variable PORT:7777 example_tests.robot
31
+ python examplelibrary.py 192.168.1.15 7777
32
+ robot --variable ADDRESS:192.168.1.15 --variable PORT:7777 tests.robot
33
+
34
+ Although the remote server in general can be used from a different machine,
35
+ this example only works correctly when tests are run on the same machine
36
+ where the server is running.
34
37
35
38
See the example library and tests themselves for details how configuration
36
39
is implemented and the general `remote server documentation <../README.rst >`__
0 commit comments