What is Robot Framework


Robot Framework is an open-source, test automation framework for Acceptance Testing and Acceptance Test-driven development.
The Framework uses the keyword-driven approach where small understandable words (either pre-defined or user-defined) are used for writing the scripts.

RPA is extensively used for Web Application Automation, API Automation, RPA, and Database Testing.

This framework consists of all the industry standard Framework features with minimal coding.

Robot Framework has an easy syntax, utilizing human-readable keywords. Its capabilities can be extended by libraries implemented with Python, Java, or many other programming languages.

Robot Framework is used by Juniper Networks, Cisco, Axon, US Naval Research Laboratory, ZYMR, Zilogic, Testmo, Rocla, and many more.

Robot Framework’s test cases are written in text files using a syntax that is similar to natural language. This makes it easy for non-technical stakeholders to understand and review the tests, and for technical users to maintain and extend them over time. The framework also provides detailed test reports and logs, which help you to quickly identify issues and debug your tests.

How to write automated test scripts?

You can easily create automated test scripts with Robot Framework. Keywords are used not only to carry out actions but also to provide assertion mechanisms. They can be subjected to arguments in order to condition their behaviour.

“Open Browser” and “Title Should Be” are two obvious examples of this. There are many test libraries that provide the necessary bits of automation as keywords, so you don’t have to code in Python/Java.

*** Settings ***
Documentation    To validate the Login Form
Library     SeleniumLibrary

*** Test Cases ***
Validate Unsuccessful Login
    Open the Browser with URL
    Fill the login form
    Verify error message is correct

*** Keywords ***
Open the Browser with URL
    Create Webdriver    Chrome  executable_path=/Vibha_Personal/RobotFramework/drivers/chromedriver_linux64
    Go To    https://opensource-demo.orangehrmlive.com/web/index.php/auth/login
    Maximize Browser Window
    Set Selenium Implicit Wait    5

Fill the login form
   Input Text    css:input[name=username]   Admin
   Input Password    css:input[name=password]   Admin
   Click Button    css:.orangehrm-login-button

Verify error message is correct
    ${result}=  Get Text    CSS:.oxd-alert-content-text
    Should Be Equal As Strings   ${result}  Invalid credentials

Features of Robot Framework

  1. Easy-to-read syntax – Robot Framework uses a simple and easy-to-read syntax that is based on keywords and tables, making it easy for both technical and non-technical users to read and write tests.
  2. Cross-platform support – Robot Framework is cross-platform and can be used to test applications on Windows, macOS, and Linux.
  3. Test cases are written using keywords (pre-defined or user-defined) in a tabular format.
  4. Built-in libraries – Robot Framework provides a rich set of built-in libraries for common testing tasks, such as file system operations, database testing, and HTTP requests.
  5. It supports the use of Variables, resource files, and Variable files
  6. Easy integration – Robot Framework can be easily integrated with other tools and libraries, including Selenium, Appium, and REST APIs.
  7. It allows tagging of test cases that come in handy while trying to run either of the Smoke Test Cases, Regression Test Cases, System Test Cases, etc.
  8. Excellent HTML Report – It provides detailed reports and logs of the script’s execution status, which is very useful if the script fails.
  9. Complete Logging of the Test Execution – The elaborate reports and logs are generated after every build execution.
  10. It supports parallel Execution of tests with Thread Safe
  11. Continuous Integration (CI) support – Robot Framework can be easily integrated with CI tools like Jenkins, making it easy to automate the testing process as part of a larger software development lifecycle.

Robot Framework vs. Cucumber

1. The Robot Framework is based on the premise that you can write test cases without having to code because there are numerous libraries available that provide reusable keywords and their underlying code. So, we do need not write code for the business requirements whereas, in the case of Cucumber, we need to write the code for the requirements.

2. Robot covers RPA (Robotic Process Automation); Cucumber doesn’t support.

3. Robot Framework has inbuilt extensive logging, which is missing in Cucumber. Cucumber can use a third-party library like Log4J to implement logging.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s