The Robot Framework is a useful framework for writing acceptance tests using the keyword approach. Keywords are short-hand commands that are provided by various libraries and can also be user defined. This easily supports BDD-style Given
-When
-Then
keywords. It also opens the door to third-party libraries defining custom keywords to integrate with other test tools, such as Selenium. It also means acceptance tests written using Robot Framework aren't confined to web applications.
This recipe shows all the steps needed to install the Robot Framework as well as the third party Robot Framework Selenium Library for use by later recipes.
virtualenv
sandbox.easy_install
robotframework
.<virtualenv
root>/build/robotframework/doc/quickstart
and open quickstart.html
with your favorite browser. This is not only a guide but also a runnable test suite.cd
<virtualenv
root>/build/robotframework/doc/quickstart
.pybot
to verify installation: pybot quickstart.html
.report.html
, log.html
, and output.xml
files generated by the test run.cd robotframework-seleniumlibrary-2.5
.python
setup.py install
.cd
demo
.python
rundemo.py
demoapp
start
.python
rundemo.py
selenium
start
.pybot login_tests
.python
rundemo.py
demoapp
stop
.python
rundemo.py
selenium
stop
.report.html
, log.html
, output.xml
, and selenium_log.txt
files generated by the test run.With this recipe, we have installed the Robot Framework and one third-party library that integrates Robot with Selenium.
There are many more third-party libraries that provide enhanced functionality to the Robot Framework. The options have enough potential to fill an entire book. So we must narrow our focus to some of the core features provided by Robot Framework, including both web and non-web testing.
18.222.167.183