Robot Framework : Installation on Ubuntu and Linux


Robot Framework Logo
Robot Framework can be installed on all major operating system platforms (Windows/Linux/Unix/Ubuntu/Mac-OS).

After having setup Robot Framework and various test libraries on my Windows-7 system, I wanted to also set it up on Ubuntu (12.04 LTS). The steps mentioned below should also work for Linux. If that's not the case, feel free to mention your findings in the comments.

So, let's get started with the installation.

1. PYTHON

Python is bundled with the Ubuntu/Linux installation.

To check if it's installed, and the installed version of Python on your system, enter the below command in terminal (shortcut key for terminal: Ctrl+Alt+T):

$ python --version

If Python is installed, you should see something like below as the output:

Python 2.7.3

Note that - Robot Framework is not yet supported on Python 3. You must have Python 2.5.X (or higher) version installed (in order to install Robot Framework 2.5 or higher)

If you need to upgrade your Python (say from 2.7.3 to 2.7.6), check out the below link:
http://askubuntu.com/questions/443048/python-2-7-6-on-ubuntu-12-04-how-to


2. PIP (Python Package Manager)

easy_install and pip are package managers for installing Python packages. Using pip is recommended as it's more advanced and has good uninstallation support.

To install pip, run the below commands:

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py



3. ROBOT FRAMEWORK

Install Robot Framework package using pip:

$ sudo pip install robotframework

This will install the latest version of Robot Framework. If you have a need to install a specific version, mention the version as below (replace 2.8.4 with your desired version):

$ sudo pip install robotframework==2.8.4

Once the installation completes, to verify if the installation went OK, enter the below command:

$ pybot --version

If the setup was successful, you should see something like below as its output:

Robot Framework 2.8.4 (Python 2.7.3 on linux2)

4. SELENIUM2LIBRARY : Robot Framework's Test Library for Webdriver tool

In order to work with Webdriver (Selenium 2) and Robot Framework, you need to install 'Selenium2Library'. You can perform the pip installation as below:

$ sudo pip install robotframework-selenium2library

This will automatically install its dependencies (decorator, selenium packages). Once the installation completes, to verify if the installation went OK, enter the below commands:

$ python

This starts the Python interpreter. Now, enter the below statement:

>> import Selenium2Library

There wouldn't be any output :). No error indicates that the library was installed successfully. You can exit the Python interpreter using exit() command.

5. RIDE : Robot Framework Integrated Development Environment

RIDE is an IDE for test development using Robot Framework.

As RIDE is developed using wxPython, you need to install wxPython 2.8 toolkit with unicode support to run RIDE. Unfortunately, pip cannot be used to install wxPython (as setup.py doesn't exist for wxPython). Run the below commands to install wxPython:

$ sudo apt-get install python-wxgtk2.8
$ sudo apt-get install python-wxversion


Now, you can perform the pip installation for RIDE as below:

$ sudo pip install robotframework-ride 

To  verify if the installation went OK, run the below command:

$ ride.py

You should see the RIDE application GUI:


Congratulations! You are all set to develop your automated tests on your Ubuntu/Linux system using Robot Framework and Selenium2Library in the RIDE editor !!

[search terms:  robot framework installation, robotframework ubuntu linux, selenium2library installation ubuntu linux, ride installation ubuntu linux, robotframework, selenium2library]

Robot Framework + Selenium2Library in 4 minutes : Can it get easier than this?

Today, I came across a good blog post by Jyri Ilama demonstrating the capabilities of Robot Framework and Selenium2Library (a keyword library for the Webdriver API) in a 4 minute video !

See the blog + video at : http://eficode.fi/en/blog/maintainable-automatic-tests-for-your-web-application/

Long live the Robot !

Robot Framework : How I stumbled upon this proven test automation framework

Almost a year ago, I had to do a Proof-of-Concept (PoC) for test automation of one of our web application using QuickTest Professional (QTP) tool (as my organization had already invested a lot on this tool). The web application was developed using Ext-GWT (Google Web Toolkit).

The PoC was not successful as I found a lot of issues in identifying the GWT/GXT web controls through QTP. Further, on checking the Product Availability Matrix document of QTP version that we were using, we found that the GWT version being supported by QTP was much older than the version that our web application was developed on.

So, the option of using QTP for test automation was ruled out.

I did another PoC using Webdriver (Selenium 2.0) using Java. With some days of self training on Webdriver and Java, I managed to develop a 'main()' driven test automation organizing the test parameters and object repository in the .properties files. It worked like a charm ! Later on, I managed to enhance the tests using TestNG.

This meant a big thumbs up for Webdriver for our test automation tool. However, the main challenge in front of me (and my organization, too) was developing a test automation framework for Webdriver/Java/TestNG. We already had proven test automation framework for QTP as most of our projects have been using it since a long time. Development of a robust test automation framework for Webdriver/Java using TestNG involved a big cost in terms of efforts. Also, it involved extensive training (for me and other test engineers) on Java.

Meanwhile, I kept on researching on the proven test automation frameworks for Webdriver that can we can use readily. I found a couple of suggested frameworks listed on SeleniumHQ.org (here).

"Robot Framework" was one of these (apart from TestNG, JUnit ...). I found that there is a large community of users who have been using successfully using Robot Framework for test automation with Webdriver, which boosted my confidence to give it a try :).

It was time for one more PoC. I spent a week on self training on Robot Framework and Selenium2Library (it is keyword library for Webdriver API). I managed to develop automated tests (or I should say - migrate my Webdriver/Java tests that I had earlier created) with Robot Framework, and it looked very promising !

Finally, in order to convince my management and client, I created a presentation on Robot Framework along with some demonstrable automated tests developed using it. Everyone was convinced and happy upon looking at the features of Robot Framework.

This is how I stumbled upon this proven framework, and began my journey to test automation development using Robot Framework :).

I plan to document my learnings in Robot Framework in this blog soon.