Categories: ProgrammingTutorials

Python Testing: Installing the Robot Framework

1 min read

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.

  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: http://robotframework.org/SeleniumLibrary/.
  8. Unpack the tarball.
  9. Switch to the directory: cd robotframework-seleniumlibrary-2.5.
  10. Install the package: python setup.py install.
  11. Switch to the demo directory: cd demo.
  12. Start up the demo web app: python rundemo.py demoapp start.
  13. Start up the Selenium server: python rundemo.py selenium start.
  14. Run the demo tests: pybot login_tests.

  15. Shutdown the demo web app: python rundemo.py demoapp stop.
  16. Shutdown the Selenium server: python rundemo.py selenium stop.
  17. Inspect the generated report.html, log.html, output.xml, and selenium_log.txt files generated by the test run.

Summary

With this recipe, we have installed the Robot Framework and one third-party library that integrates Robot with Selenium.

Further resources on this subject:

Packt

Share
Published by
Packt

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago