Robot Framework is a Python-based, extensible keyword-driven automationframework for acceptance testing, acceptance test driven development (ATDD),behavior driven development (BDD) and robotic process automation (RPA). Itcan be used in distributed, heterogeneous environments, where automationrequires using different technologies and interfaces.
The framework has a rich ecosystem around it consisting of various genericlibraries and tools that are developed as separate projects. For moreinformation about Robot Framework and the ecosystem, see
The test data is in simple, easy-to-edit tabular format. WhenRobot Framework is started, it processes the data, executes testcases and generates logs and reports. The core framework does notknow anything about the target under test, and the interaction with itis handled by libraries. Libraries can either use applicationinterfaces directly or use lower level test tools as drivers.
There are several Robot Framework mailing lists where to ask andsearch for more information. The mailing list archives are open foreveryone (including the search engines) and everyone can also jointhese lists freely. Only list members can send mails, though, and toprevent spam new users are moderated which means that it might take alittle time before your first message goes through. Do not be afraidto send question to mailing lists but remember How To Ask QuestionsThe Smart Way.
Robot Framework is open source software provided under the Apache License2.0. Robot Framework documentation such as this User Guide use theCreative Commons Attribution 3.0 Unported license. Most libraries and toolsin the larger ecosystem around the framework are also open source, but theymay use different licenses.
These instructions cover installing Robot Frameworkand its preconditions on different operating systems. If you already havePython installed, you can install Robot Framework usingthe standard package manager pip:
Robot Framework is implemented using Python, and a precondition to install itis having Python or its alternative implementation PyPyinstalled. Another recommended precondition is having the pip package manageravailable.
Robot Framework requires Python 3.8 or newer. The latest version that supportsPython 3.6 and 3.7 is Robot Framework 6.1.1. If you need to use Python 2,Jython or IronPython,you can use Robot Framework 4.1.3.
On Linux you should have suitable Python installation with pip availableby default. If not, you need to consult your distributions documentationto learn how to install them. This is also true if you want to use some otherPython version than the one provided by your distribution by default.
Notice that if your distribution provides also older Python 2, running pythonmay use that. To use Python 3, you can use python3 command or even more versionspecific command like python3.8. You need to use these version specific variantsalso if you have multiple Python 3 versions installed and need to pinpoint whichone to use:
Installing Robot Framework directly under the system provided Pythonhas a risk that possible problems can affect the whole Python installationused also by the operating system itself. NowadaysLinux distributions typically use user installs by default to avoid suchproblems, but users can also themselves decide to use virtual environments.
On Windows Python is not available by default, but it is easy to install.The recommended way to install it is using the official Windows installers availableat For other alternatives, such as installing from theMicrosoft Store, see the official Python documentation.
When installing Python on Windows, it is recommended to add Python to PATHto make it and tools like pip and Robot Framework easier to execute fromthe command line. When using the official installer, you just needto select the Add Python 3.x to PATH checkbox on the first dialog.
MacOS does not provide Python 3 compatible Python version by default, so itneeds to be installed separately. The recommended approach is using the officialmacOS installers available at If you are using a packagemanager like Homebrew, installing Python via it ispossible as well.
PyPy is an alternative Python implementation. Its main advantage over thestandard Python implementation is that it can be faster and use less memory,but this depends on the context where and how it is used. If execution speedis important, at least testing PyPy is probably a good idea.
Installing PyPy is a straightforward procedure and you can find both installersand installation instructions at To validate that PyPy installationwas successful, run pypy --version or pypy3 --version.
The PATH environment variable lists directories where commands executed ina system are searched from. To make using Python, pip and Robot Framework easierfrom the command line, it is recommended to add the Python installation directoryas well as the directory where commands like pip and robot are installedinto PATH.
When using Python on Linux or macOS, Python and tools installed with it should beautomatically in PATH. If you nevertheless need to update PATH, youtypically need to edit some system wide or user specific configuration file.Which file to edit and how depends on the operating system and you need toconsult its documentation for more details.
These instructions cover installing Robot Framework using pip, the standardPython package manager. If you are using some other package manager likeConda, you can use it instead but need to study itsdocumentation for instructions.
When installing Python, you typically get pip installed automatically. Ifthat is not the case, you need to check the documentation of that Pythoninstallation for instructions how to install it separately.
Typically you use pip by running the pip command, but on Linux you may needto use pip3 or even more Python version specific variant like pip3.8instead. When running pip or any of its variants, the pip version that isfound first in PATH will be used. If you have multiple Python versionsinstalled, you may need to pinpoint which exact version you want to use.This is typically easiest done by running python -m pip and substitutingpython with the Python version you want to use.
The easiest way to use pip is by letting it find and download packages itinstalls from the Python Package Index (PyPI), but it can also installpackages downloaded from the PyPI separately. The most common usages areshown below and pip documentation has more information and examples.
Another installation alternative is getting Robot Framework source codeand installing it using the provided setup.py script. This approach isrecommended only if you do not have pip available for some reason.
The setup.py script accepts several arguments allowing, for example,installation into a non-default location that does not require administrativerights. It is also used for creating different distribution packages. Runpython setup.py --help for more details.
If you have installed Robot Framework under multiple Python versions,running robot will execute the one first in PATH. To select explicitly,you can run python -m robot and substitute python with the right Pythonversion.
Python virtual environments allow Python packages to be installed inan isolated location for a particular system or application, rather thaninstalling all packages into the same global location. They havetwo main use cases:
This section covers Robot Framework's overall test data syntax. The followingsections will explain how to actually create test cases, test suites and so on.Although this section mostly uses term test, the same rules apply alsowhen creating tasks.
Test case files, test suite initialization files and resource files areall created using Robot Framework test data syntax. Test libraries andvariable files are created using "real" programming languages, mostoften Python.
Different sections are recognized by their header row. The recommendedheader format is *** Settings ***, but the header is case-insensitive,surrounding spaces are optional, and the number of asterisk characters canvary as long as there is at least one asterisk in the beginning. For example,also *settings would be recognized as a section header.
Robot Framework supports also singular headers like *** Setting ***, but thatsupport was deprecated in Robot Framework 6.0. There is a visible deprecationwarning starting from Robot Framework 7.0 and singular headers will eventuallynot be supported at all.
The header row can contain also other data than the actual section header.The extra data must be separated from the section header using the dataformat dependent separator, typically two or more spaces. These extra headersare ignored at parsing time, but they can be used for documentingpurposes. This is especially useful when creating test cases using thedata-driven style.
The most common approach to create Robot Framework data is using thespace separated format where pieces of the data, such as keywordsand their arguments, are separated from each others with two or more spaces.An alternative is using the pipe separated format where the separator isthe pipe character surrounded with spaces ().
Suite files typically use the .robot extension, but what files areparsed can be configured. Resource files can use the .robotextension as well, but using the dedicated .resource extension isrecommended and may be mandated in the future. Files containing non-ASCIIcharacters must be saved using the UTF-8 encoding.
Robot Framework supports also reStructuredText files so that normalRobot Framework data is embedded into code blocks. Only files withthe .robot.rst extension are parsed by default. If you wouldrather use just .rst or .rest extension, that needs to beconfigured separately.
Robot Framework data can also be created in the JSON format that is targetedmore for tool developers than normal Robot Framework users. Only JSON fileswith the custom .rbt extension are parsed by default.
Earlier Robot Framework versions supported data also in HTML and TSV formats.The TSV format still works if the data is compatible with the space separatedformat, but the support for the HTML format has been removed altogether.If you encounter such data files, you need to convert them to the plain textformat to be able to use them with Robot Framework 3.2 or newer. The easiestway to do that is using the Tidy tool, but you must use the version includedwith Robot Framework 3.1 because newer versions do not understand the HTMLformat at all.
3a8082e126