Robot Framework is a generic
test automation
In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive bu ...
framework for
acceptance testing
In engineering and its various subdisciplines, acceptance testing is a test conducted to determine if the requirements of a specification or contract are met. It may involve chemical tests, physical tests, or performance tests.
In systems e ...
and
acceptance test-driven development
Acceptance test–driven development (ATDD) is a development methodology based on communication between the business customers, the developers, and the testers. ATDD encompasses many of the same practices as specification by example (SBE), behavi ...
(ATDD). It is a
keyword-driven testing framework that uses tabular test data syntax.
History
The basic ideas for Robot Framework were shaped in Pekka Klärck's masters thesis in 2005. The first version was developed at
Nokia Networks
Nokia Networks (formerly Nokia Solutions and Networks (NSN) and Nokia Siemens Networks (NSN)) is a multinational data networking and telecommunications equipment company headquartered in Espoo, Finland, and wholly owned subsidiary of Nokia Corp ...
the same year. Version 2.0 was released as
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
software June 24, 2008 and version 3.0.2 was released February 7, 2017.
The framework is written using the
Python programming language and has an active community of contributors. It is released under
Apache License 2.0 and can be downloaded from robotframework.org.
In 2020 survey it scored 8 among 12 test automation frameworks, with 3 % of respondents using it. In 2021 it had fallen to 18 among 22 with 2 % usage.
Description
Test cases are written using a keyword-testing methodology written in a tabular format. These tables can be written in plain text,
tab-separated values
A tab-separated values (TSV) file is a simple text format for storing data in a tabular structure, e.g., a database table or spreadsheet data, and a way of exchanging information between databases. Each record in the table is one line of the text ...
(TSV), or
reStructuredText
reStructuredText (RST, ReST, or reST) is a file format for textual data used primarily in the Python programming language community for technical documentation.
It is part of the Docutils project of the Python Doc-SIG (Documentation Special Inte ...
(reST) formats files
in any text editor or using the Robot
Integrated Development Environment
An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(RIDE).
RIDE simplifies writing test cases by providing framework-specific code completion,
syntax highlighting
Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms. ...
, etc.
Examples
The following test case implements a
Hello, World! example:
*** Test Cases ***
Demo
Log Hello world
Log
is a built-in keyword that logs the given parameter to the test report generated by Robot Framework.
With SeleniumLibrary,
writing tests for
web application
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
s is very easy too:
*** Test Cases ***
Demo
Open Browser https://www.google.com ie
Input Text id=lst-ib Hollywood Celebrities
Click Button Google Search
This test opens a new
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
browser window with Google and performs an Internet search for "Hollywood Celebrities" by pressing the button "Google Search".
With Robot Framework Browser,
automation can be done with
Chromium
Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal.
Chromium metal is valued for its high corrosion resistance and h ...
,
WebKit
WebKit is a browser engine developed by Apple and primarily used in its Safari web browser, as well as on the iOS and iPadOS version of any web browser. WebKit is also used by the BlackBerry Browser, PlayStation consoles beginning from the ...
and
Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current and ...
.
*** Settings ***
Library Browser
*** Test Cases ***
Example Test
New Page https://playwright.dev
Get Text h1 🎭 Playwright
Add-ons
These libraries are best implemented in
Python, but using
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
or
.NET is also possible.
Other languages such as
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
,
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
, and
PHP
PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
can be used for libraries as well, using the documented remote library interface.
See also
*
Acceptance testing
In engineering and its various subdisciplines, acceptance testing is a test conducted to determine if the requirements of a specification or contract are met. It may involve chemical tests, physical tests, or performance tests.
In systems e ...
*
Keyword-driven testing
*
Data-driven testing
*
Test-driven development
Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against a ...
References
External links
* {{Official website, http://www.robotframework.org
Free software programmed in Python
Software testing
Free software testing tools
Software using the Apache license