Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robot Framework Test Automation

You're reading from  Robot Framework Test Automation

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781783283033
Pages 98 pages
Edition 1st Edition
Languages
Author (1):
Sumit Bisht Sumit Bisht
Profile icon Sumit Bisht
Toc

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.

You have been reading a chapter from
Robot Framework Test Automation
Published in: Oct 2013 Publisher: Packt ISBN-13: 9781783283033
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}