Robot Framework – An Unglorified Hero

PART – 1

As we all are aware, in today’s fast world, we need automation to reduce human work, increase speed, repeatability, reusability and coverage. There is a need for one such swift tool that can do all this for us and for those non-programmers too out there who are best at their testing capabilities, business and functional knowledge. And of course, for programmers, the robot framework empowers them to write up customized libraries! Since the robot framework is a modular framework, it can be easily learnt and implemented quickly.

In short, Robot Framework is probably one of the most worthwhile Test Automation frameworks available in the market. In terms of value for money, it’s on the top of the list. Robot Framework consists of a set of tools, techniques and abstract rules; its job (besides allowing to write automated test cases) is simplifying the Test Automation process.

This article gives the detailed overview of the robot framework and the installation steps. It also provides the know-how on its simplicity, and yet how powerful tool it can be.

Intended Audience

This article is meant to be used by anyone who wants to use the robot framework for testing their project, including the non-programmers, who swiftly want to contribute the reusable and maintainable test code.

Robot Framework

Robot Framework is a generic, application and technology independent framework. Apparently, more suitable for acceptance test driven development (ATDD). RF facilitates powerful and yet simple test automation against a variety of interfaces and features, some distinct advantages when compared to those other frameworks.

Robot Framework Architecture

The RF is written in Python. Consequently, it runs on Python, Jython or IronPython. The framework can thus be used with any OS that is able to run any of these interpreters, e.g. Windows, Linux or OS X.

Robot Framework has a modular architecture that can be extended with bundled and self-made test libraries.

Test data is defined in files using the syntax. A file containing test cases creates a test suite and placing these files into directories creates a nested structure of test suites

When test execution is started, the framework first parses the test data. It then utilizes keywords provided by the test libraries to interact with the system under test. Libraries can communicate with the system either directly or using other test tools as drivers.

Why Robot Framework makes it as a hero…?

  • Framework architecture is clear.
  • Robot Framework has a modular architecture that can be extended with bundled and self-made test libraries.
  • Framework test result is user friendly. As a result, users get report and log in HTML format as well as XML output.
  • Non-technical person who does not have experience with programming language can contribute and add value, (Example: a PO)-Create readable tests that are easily understood.
  • Easier to learn- Has easy to use test data syntax.
  • Quick and fast implementation
  • Can Focus on functional test coverage than learning oops concepts which is very much required for selenium
  • Complete documentation is available as a reference for-
    • robot framework,
    • selenium library,
    • collections library
  • Support and documentation available for CI tools like Jenkins.
  • Apart from selenium library, it supports variety of libraries for UI, API and networking areas automation, thereby making it highly extensible.
  • Although it’s not a built-in ability, RF enables to execute parallel tests via pabot library or Selenium Grid.

Installation

To use Robot Framework with Python, you need to install Python, robot framework, Selenium2Library and other supporting libraries.

Step1: Install Python2.7 version

Visit the link to download and install Python 2.7 version. After installing Python 2.7, add your python installation to your system environment path. On Windows, add ‘c:\Python27\; c:\Python27\Scripts\;‘ to your path. After installing, you can confirm python installation with the command below.

Step 2: Verify Python 2.7 version

python –version

Command result will be:

 Step 3: Install robot framework with pip command.

When you install Python, pip application will be installed automatically. If you are familiar with installing Python packages and have pip available, just run the following command.

pip install robot framework

Step 4: Verify robot framework installation

After a successful installation with Python, you should be able to execute the following commands on the command prompt to verify the installation.

pybot –version

Command Result will be:

Step 5: Install Selenium2Library

You can install robotframework-selenium2library by downloading the packaged executable file or using the python pip application. Here is the link to download. Use the following command to install robotframework-selenium2library with pip.

pip install robotframework-selenium2library

Step 6: Install Selenium Library

Since Selenium2Library has some dependencies for selenium library, you need to install selenium library. The easy way of installing selenium library is to use pip. You can use the following command to install selenium.

pip install -U seleniu

Step 7: Install Eclipse Editor

Install Eclipse-Oxygen from this link.

 

In the next part, I shall let you know on how to design the test script using Robot framework!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*