Python Testing: Installing the Robot Framework

Making your life easier with automated testing of Python is the sole aim of this book. Because it’s a cookbook, you can take things at your own pace, in your own order, and learn practical application rather than nebulous theory.


Python Testing Cookbook

Python Testing Cookbook

Over 70 simple but incredibly effective recipes for taking control of automated testing using powerful Python testing tools

        Read more about this book      

(For more resources on Python, see here.)

How to do it...

  1. Be sure to activate your virtualenv sandbox.
  2. Install by typing: easy_install robotframework.
  3. Using any type of window navigator, go to <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.
  4. Switch to your virtualenv's build directory for Robot Framework: cd <virtualenv root>/build/robotframework/doc/quickstart.
  5. Run the Quick Start manual through pybot to verify installation: pybot quickstart.html.

    Python Testing Cookbook

  6. Inspect the generated report.html, log.html, and output.xml files generated by the test run.
  7. Install the Robot Framework Selenium library to allow integration with Selenium by first downloading:
  8. Unpack the tarball.
  9. Switch to the directory: cd robotframework-seleniumlibrary-2.5.
  10. Install the package: python install.
  11. Switch to the demo directory: cd demo.
  12. Start up the demo web app: python demoapp start.
  13. Start up the Selenium server: python selenium start.
  14. Run the demo tests: pybot login_tests.

    Python Testing Cookbook

  15. Shutdown the demo web app: python demoapp stop.
  16. Shutdown the Selenium server: python selenium stop.
  17. Inspect the generated 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.

Further resources on this subject:

Books to Consider

comments powered by Disqus