ROBOT FRAMEWORK

Robot Framework is a generic test automation framework for
acceptance testing and acceptance test-driven development
(ATDD). It has easy-to-use tabular test data syntax and it
utilizes the keyword-driven testing approach. Its testing
capabilities can be extended by test libraries implemented
either with Python or Java, and users can create new
higher-level keywords from existing ones using the same
syntax that is used for creating test cases.

Robot Framework project is hosted on
GitHub
where you can find further documentation,
source code, and issue tracker. Downloads are hosted at
PyPI.
The framework has a rich ecosystem around it consisting of various
generic test libraries
and tools that are developed
as separate projects.

Robot Framework is operating system and application independent.
The core framework is implemented using
Python and
runs also on
Jython (JVM) and
IronPython (.NET).

Clear.

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 shown in the
examples below. A file containing test cases creates a test
suite and placing these files into directories creates a
nested structure of test suites.

Easy.

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.

Test execution is started from the command line. As a result
you get report and log in HTML format as well as an XML
output. These provide extensive look into what your system does.

Modular.

Click for bigger version!

EXAMPLES

*** Settings ***DocumentationA test suite with a single test for valid login....... This test has a workflow that is created using keywords in... the imported resource file.Resourceresource.txt*** Test Cases ***Valid LoginOpen Browser To Login PageInput UsernamedemoInput PasswordmodeSubmit CredentialsWelcome Page Should Be Open [Teardown] Close Browser

Let's start with a real-life example from our web demo project. Here we have a test suite with one test case which tests that login is valid. As you can see, test data syntax is based on keywords.

Keywords are composable, meaning you can define new keywords that use pre-existing keywords. This way, you can abstract details of testing to something that makes immediate sense; for example, we don't need to know what exactly the step Submit Credentials actually does, unless we want to. Test cases are therefore clear and readable, with just the right level of abstraction to convey the intent of the test, rather than the nuts and bolts.

See next example for what you're going to get once this example is run!

Executing the test suite file from previous example, we get the meat and bone of Robot Framework: A comprehensive debriefing on what happened in the test execution in two parts: the Report and the Log.

This Report and Log are based on executing the test suite described in the previous example and is from our web demo project.

Report details clearly viewable statistics including Pass/Fail ratios and elapsed times. This gives you great overview on the test execution.

Log details statistics from each step of the test execution, from keyword to keyword. It enables you to drill down on the specifics of the test in case of failure or otherwise.

Keywords can be defined outside of the test suite and be imported as an external resources. This means you can collect generally useful keywords to one place and share them throughout your project, keeping also the testing DRY!

Below, we have test case testing invalid login in our very own web demo. As you can see, we can abstract away a lot of necessary, but ultimately non-expressive nuts and bolts of the testing to the resource file.

Want to do Gherkin-style behaviour-driven test development made famous by Cucumber? No problem! That's baked in!

Here is another example from our Robot Demo that shows how you can level the expressiveness of Given-When-Then in Robot Framework.

THE LIBRARIES

Test libraries provide the actual testing capabilities to
Robot Framework by providing keywords. There are several standard libraries that are
bundled in with the framework, and galore of separately
developed external libraries that can be installed based on your
needs. Creating your own test libraries is a breeze.

Builtin
Provides a set of often needed generic keywords. Always automatically available without imports.

Dialogs
Provides means for pausing the test execution and getting input from users.

Collections
Provides a set of keywords for handling Python lists and dictionaries.

OperatingSystem
Enables various operating system related tasks to be performed in the system where Robot Framework is running.

Remote
Special library acting as a proxy between Robot Framework and test libraries elsewhere. Actual test libraries can be running on different machines and be implemented using any programming language supporting XML-RPC protocol.

Remote
Built-in special library acting as a proxy between Robot Framework and test libraries elsewhere. Actual test libraries can be running on different machines and be implemented using any programming language supporting XML-RPC protocol.

RemoteApplications
Special test library for launching Java applications on a separate JVM and taking other libraries into use on them.

THE TOOLS

Supporting tools ease everything surrounding tests: editing, running, building and so
on. Most of these tools are developed as separate projects,
but some are built into the framework itself.

THE DOCS

Want to get started? Looking for a way to do things? Here
are the most important documentation resources needed to
work with Robot Framework. Notice that
individual test libraries
and tools in the ecosystem have their
own documentation that is typically accessed via their
project pages.