官术网_书友最值得收藏!

Installing and setting up the Robot Framework

The current version of the Robot Framework requires Python 2.7 for setup.

As of now, only pybot script gets created from a Python environment. In case of other environments, only the corresponding execution script gets created. If you happen to have multiple environments, then installation of different scripts is also possible. This differs from the previous versions where on installation, both pybot and jybot scripts were installed.

For custom installation, you will require Python, Jython, or Ironpython pre-installed; and environment PATH variable set correctly as the Robot Framework will use the first Python binary available on PATH or the exact library if supplied with the python command. You can verify this from the command line:

sumit@darkstar066:~$ python --version 
Python 2.7.4 
sumit@darkstar066:~$ jython --version 
Jython 2.5.2 
sumit@darkstar066:~$ 

On the project downloads page, there are various options, listed here under the following self-explanatory headings.

Source installation

To use the source, you can either download the zip containing sources or clone the project using mercurial hg clone: https://code.google.com/p/robotframework.

This will clone the project in the current directory and then you can either straightaway install the project, or make some modifications for customizing the framework.

Now go to the folder where source is checked out/unzipped and perform the following commands based upon the environment present:

python setup.py install

The preceding command installs the Python based version with pybot and rebot runner scripts.

jython setup.py install

The preceding command installs the Jython based version, with jybot and jyrebot scripts.

ipy setup.py install

The preceding command installs the Ironpython based runtime with ipybot and ipyrebot scripts.

If you see this folder, along with standard setup.py, there is another file, install.py, that can be used to install (it is the similar as installation from setup.py), reinstall, or uninstall the framework that can be used as follows:

python install.py in [Installation]
python install.py un [Uninstallation]
python install.py re [Re-Installation]

To install with Jython or IronPython, replace python with jython or ipy respectively in the command. You may have to use sudo/run console as administrator if you run into any authentication errors, depending upon the user privileges.

Installing from source with python

One-click graphical installer

If you happen to be running Windows XP (32-bit), than you will want to use the one-click installer that installs the Robot Framework as well as Python and optionally, Jython and sets the paths without requiring any intervention. Other graphical installers for windows also exist in 32 and 64 bit versions.

Java environment installation

You can use the standalone jar that contains a bundled Jython as well as the framework. You just need to have Java installed on your system to execute the runnable jar for its installation.

In this method, instead of a command, the jar file is executed:

java -jar robotframework.jar run [options] data_sources

The Python package installation

The pip install mechanism only requires, you to have the Python and package managers such as easy_install or pip installed on your computer. To install this, you just have to type pip install robotframework or easy_install robotframework from the command prompt and the Python based Robot Framework gets installed.

Note that, for Python to run correctly, you'll need elementtree module as the default one is already broken.

The user can install more than one environment simultaneously on a computer and use the specified commands separately without affecting either of the installations.

主站蜘蛛池模板: 额敏县| 东莞市| 富蕴县| 安多县| 尼玛县| 禹城市| 建昌县| 元阳县| 夏邑县| 新乐市| 玉溪市| 鄄城县| 河西区| 金门县| 青海省| 汤原县| 济源市| 新密市| 日喀则市| 定陶县| 东乡县| 永寿县| 观塘区| 石家庄市| 东台市| 阳西县| 兴义市| 叶城县| 收藏| 仪征市| 牡丹江市| 静安区| 绥德县| 丽江市| 沾益县| 潢川县| 义乌市| 乡宁县| 伊春市| 昌图县| 教育|