Skip to content

Latest commit

 

History

History
166 lines (119 loc) · 5.1 KB

index.rst

File metadata and controls

166 lines (119 loc) · 5.1 KB

Writing Robot Framework tests for Plone

plone.app.robotframework provides Robot Framework-compatible tools and resources for writing functional Selenium-tests (including acceptance tests) for Plone CMS and its add-ons.

This documentation gives you everything to get started in writing and executing functional Selenium tests (including acceptance tests) for Plone or your own Plone add-on. We depend on two testing frameworks, Robot Framework and Selenium (with Selenium2Library), and our tools and resources provided in plone.app.robotframework.

Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD), even for behavior driven development (BDD). It has easy-to-use plain text test syntax and utilizes the keyword-driven testing approach. Selenium is a web browser automation framework that exercises the browser as if the user was interacting with the browser.

Start here

Start here to learn the default way of writing Robot Framework tests to be run just next to your other Plone-tests with zope.testrunner:

.. toctree::
   :maxdepth: 2

   happy
   robot

Print these

Print these keyword libraries to be easily available when writing Robot Framework tests, because they provide the basic building blocks for your tests:

Advanced topics

.. toctree::
   :maxdepth: 1
   :titlesonly:

   debugging
   travis-ci
   saucelabs
   reload
   ride


User keywords

plone.app.robotframework ships with the following user keyword libraries as resource files:

Each user keyword library can be included as a resource with Resource plone/app/robotframework/libraryname.rst in test suite *** Settings ***.

Remote keywords

Remote keywords are a special plone.app.robotframework-way to implement Plone-specific keyword in Python for e.g. creating Plone content in test setup keywords. plone.app.robotframework comes with the following remote keyword libraries:

All remote keywords above are included by including a special test fixture plone.app.robotframework.testing.REMOTE_LIBRARY_BUNDLE_FIXTURE in bases of the used functional testing fixture, and finally with Library Remote ${PLONE_URL}/RobotRemote-command in test suite *** Settings ***.

See testing.py in plone.app.robotframework for how to create a custom remote library bundle fixture with only selected (or custom) remote keyword libraries.

Python keywords

In addition to user keywords and remote libraries, plone.app.robotframeworks provides the following generic Python keyword libraries (their code is not dependent on Plone code base).

Each Python keyword library can be included as with Library plone.app.robotframework.LibraryClassName in test suite `*** Settings ***.

Other resources

Old tutorials

Note

While these tutorials are still useful for getting started with Robot Framework testing for Plone, these may contain outdated instructions!

.. toctree::
   :maxdepth: 1
   :titlesonly:

   Write a robot test for a new Plone add-on <templer>
   Write a robot test for an existing Plone add-on <tutorial>
   Speed up your test writing with robot-server <server>
   Speed up your BDD Given-clauses with a remote library <remote>


.. toctree::
   :hidden:

   examples
   keywords
   plone-keywords/browser
   plone-keywords/content
   plone-keywords/edit-wizard-tabs
   plone-keywords/history
   plone-keywords/index
   plone-keywords/login