How to utilize Robot Framework in test automation

What is Robot Framework?Robot-framework-logo

Robot Framework is an open-source software automation framework. It is widely used for test automation and robotic process automation.

Robot Framework has gained immense popularity among software professionals. It is being used all over the world and has more than 5 million downloads per year.

Moreover, it swarms a very active and growing user community. The community is active in asking questions and replying to them, and contributing to development. Robot Framework users have developed and published several add-ons and extensions for the user of the whole community.

The core framework understands scripts, executes them, and generates logs and reports. It is possible for anyone to extend Robot Framework with libraries that enable the automation scripts to interact with different types of application interfaces. A set of built-in libraries comes packaged with Robot Framework. In addition to the default libraries, there are tons of libraries developed by the community and are openly accessible. One such example is Selenium2Library for automating web applications.

Building scalable test automation

“Robot Framework is a generic automation framework that can be used basically with any interface.“

Robot Framework and Qentinel are bound together since the beginning

Qentinel was the birthplace of Robot Framework. Over the years, Qentinel applied Robot Framework to build advanced test automation solutions for its customers. Eventually, Robot Framework became a core component in Qentinel Pace,  Qentinel’s cloud-based robotic software testing platform. You can use your existing Robot Framework automation assets and use them in Qentinel Pace without any modifications. Try it here

2002

Qentinel is founded and delivers the first automation projects.

2003

Pekka Klärck (then Pekka Laukkanen) joins Qentinel as a test automation trainee.

2004

Despite the success of its test automation efforts, Qentinel team is not happy with the productivity of the existing test automation technologies. Keyword-based test automation by Hans Buwalda is tried as a new and different approach. 

2005

The basic ideas for Robot Framework were tried in a couple of Qentinel’s customer projects and further shaped in Pekka's master's thesis.

Pekka wanted to build a generic test automation framework so that any test automation project could be built on top of that framework without having to build everything from the scratch. .

Laukkanen, Pekka: "Data-Driven and Keyword-Driven Test Automation Frameworks", 2006

2006

Nokia has become an active user of Robot Framework and the technology is being further developed in Nokia under Pekka’s architectural leadership. Pekka and Harri Töhönen of Qentinel, together with Petri Haapio of Nokia, come up with a proposal to publish Robot Framework under an open source license.

Read Esko Hannula's blog: How I first met Robot Framework - and what happened then

2007

Preparations for open-sourcing Robot Framework begin. It is seen that the value of the technology grows best if its user community grows, too. This makes sense because the Robot Framework architecture kind of mandates having an active contribution from the community for the framework to prosper.

More research is done about the applicability of keyword-based test automation and supports the development of the technology, among them Juha Rantanen's Qentinel master thesis about the use of Robot Framework for test-driven development (TDD). 

Juha Rantanen Thesis work about TDD: Acceptance Test-Driven Development with Keyword-Driven Test Automation Framework in an Agile Software Project

Pekka leaves Qentinel to pursue an independent career as the master-mind behind Robot Framework.

2008

Version 2.0 of Robot Framework is released as open-source software on June 24, 2008.

2009 - 2014

The use of Robot Framework grows. It becomes the most popular test automation tool in its homeland Finland and gains popularity all over the world.

2015

Companies actively using Robot Framework, Qentinel among them, establish Robot Framework foundation to promote Robot Framework and accelerate its adoption and development.

2016 - 2017

Working with some of its advanced customers, Qentinel recognizes growing complexity, volume, and dependability requirements for test automation solutions. Qentinel experiments with technologies and solutions to complement Robot Framework with test infrastructure management, test collaboration, and quality metrics.  

2018

Qentinel launches Qentinel Pace a cloud-based test platform Qentinel Pace. Robot Framework plays a key role in the core executor of Qentinel Pace.

2021

Qentinel releases QWeb, the web automation library of Qentinel Pace, as open source.

 

Qentinel and Robot Framework together

What makes Robot Framework special?

The power of Robot Framework lies in its extensibility and integrability. One can build their libraries pertaining to their needs and append them to Robot Framework. If you can build an interface to interact with your robotic vacuum cleaner (or anything else you can imagine of), you can test it using Robot Framework.

With all that freedom comes the cost too. Since it is such a generic and customizable automation framework, the learning curve is rather steep. As one may need to install specific library versions, build their libraries and set standard ways of working.

sbslsl_1920

What is a keyword-driven automation framework?

RFW is a keyword-driven automation framework. This means that the end-user is writing the automation procedure with a bunch of keywords. Keywords are sometimes also known as action words.

A keyword could be a single step like ClickText, which then takes an argument for example "Click Text Ok", and clicks on an OK button on the application. It raises an exception if such a button is not found, and thus fails your test. Or a keyword can be a combination of many keywords. For example, one keyword 'Enter Login Credentials and Click Ok' is comprised of many keywords underneath. By that, one could create their abstraction layer with keywords. A test case would be a collection of keywords, which may or may not have deeper hierarchies of keywords under them. Eventually when a keyword is called the lowest level of keyword executes something concrete for example clicking or typing. The definition of the lowest keywords is written in Python. There is support for writing it in Jython too. At the core, RFW is executing a python code, whereas the test automation engineer is interacting with an English-like keyword.

person-holding-umbrella-standing-above-stairs-1695056

What are the advantages of keyword-driven testing?

The advantages of keyword-driven testing are that it reduces the sensitivity to maintenance caused by changes in the System/Software Under Test (SUT). If screen layouts change or the system is migrated to another OS hardly any changes have to be made to the test cases: the changes will be made to the keyword documentation (or keyword code), one document for every keyword, no matter how many times the keyword is used in test cases, and it implies a deep process of test design.

Also, due to the very detailed description of the way of executing the keyword (in the keyword documentation) the test can be performed by almost anyone. Thus keyword-driven testing can be used for both manual testing and automated testing. (Wikipedia)

auto

How does Robot framework compare to other popular open-source testing tools and frameworks, like Selenium?

RFW is different from other frameworks, tools, or components such that it is an extremely generic and open automation framework. Hence it is not limited in use. For example, although Selenium is not a framework it cannot be used for native application testing. For example, Cypress is a test automation framework, but it cannot be used to test elevators or IoT.

“The advantages of keyword-driven testing are that it reduces the sensitivity to maintenance“

Tips for designing automated tests for Robot Framework

In Robot Framework, you write test cases using keywords. Keywords are like simple commands that do things with the software you want to automate. You may embed keywords into keywords to create an appropriate level of abstraction for you. There are default libraries that come packaged with Robot Framework and add-on libraries for multiple purposes. Lastly, you can build libraries for your specific purposes.

Test with efficiency and effectiveness

piuhoja

How to create platform-agnostic test cases with PaceWords

Test cases are written in Qentinel Pace with keywords too. The standard Qentinel Pace offering is specific for end-to-end cross-platform UI Testing. Qentinel Pace keywords are called PaceWords. PaceWords are a highly intuitive, platform-agnostic and application-independent way of writing test cases. Pacewords uses a stack of technologies to interact with the application under test for a strong and robust element detection. At the core, one interacts with the text visible on the application UI, as against xpaths in Selenium. This makes PaceWords highly easy to use, read and maintain. PaceWords provide a platform-agnostic abstraction layer. Let's say a user wants to create an automated test to click on an OK button on an application running on a mobile, web browser, and desktop -- all she needs to write is "ClickText OK"

The stack of technologies like computer vision, Selenium, Appium, etc. enables PaceWords to work across the platform while the user does not have to worry about it. Moreover, PaceWords can fallback on one technology to another for double-checking a certain failure. For example, if an element is not visible with Web automation tech, Qentinel Pace can utilize Computer Vision to double-check.

If you are looking at automating a web application with Qentinel Pace, you don’t need to struggle with xpaths and timeouts, as is the case with the Selenium library.

That being said, just like RFW, you could create your custom libraries and run them in Qentinel Pace. For example, Qentinel Pace can control a robotic arm to do non-intrusive testing.

RFW is excellent for testing and that’s why we use it in our product too. However, one needs a lot efforts in the setting- up and maintenance and lot more and that is where Qentinel Pace can be of significant help.

PaceWords in detail

Estimating the needed effort for test automation

Three significant things need to been taken into account, which are directly related to the productivity, speed and efficiency of test automation.

  1. Test environments
    Building test environment can take a lot of building and maintenance effort and investment. If you start from scratch and build it locally.
    In Qentinel Pace, you could spin up test environments in a few seconds. And you do not need to worry about their maintenance and good health. When you scale your test automation, maintenance in general and test environment maintenance in particular eats up a rather significant share of your efforts – customers prior to using Qentinel Pace noticed such numbers as 50  % and a sharp drop in maintenance when they started using Qentinel Pace. This is something you need to build and maintain yourself with Selenium and Robot Framework. Maintenance arises from many factors such as browser versions, lib versions, other packages, etc. Also you would need to have dedicated isolated run environments for running your tests in your CI/CD, in Qentinel Pace all robots are isolated environments and you can have as many of them as you want. This provides a significant kick-start and a continued time saving on the maintenance.

  2. Test cases design:
    An open framework, such as Robot Framework, gives you a great freedom to do things in various ways. You may do things quick&dirty, or emphasize ease of use, ease of learning, or cost of maintenance.
    Qentinel’s test case design strategy evolved through long experience in very large test automation solutions where test design could not rely on technical staff only and the cost of test maintenance had to be managed carefully. We call it PaceWords.  

  3. Collaboration: 
    It takes effort and time for testers and teams distributed over the globe can to access, create and run test automation.
    To minimize needed effort on this it is good that all the results are stored and made available to everyone in the project. Test managers should be able to checkout results from and even initiate test runs themselves.
    Check how  all the results are stored and made available to everyone in the project in Qentinel Pace.

Start Free Trial