SlideShare a Scribd company logo
Acceptance testing! 
Plone sites and add-ons 
with Robot Framework! 
and Selenium 
Asko Soukka, asko.soukka@iki.fi 
University of Jyväskylä, Finland
Hello! 
+ Asko Soukka 
Twitter: @datakurre 
IRC: datakurre 
Email: asko.soukka@iki.fi 
Web: datakurre.pandala.org 
+ Software developer at 
University of Jyväskylä 
Finland 
+ Plone Foundation Member
Menu 
Terminology! 
+ Acceptance testing 
+ Robot framework 
+ Selenium 
! 
Acceptance testing Plone! 
+ Just do it with a live instance 
+ Do it safely with a dedicated instance 
+ Do it correctly in a p.a.testing sandbox 
+ Do it with while writing your 
documentation with screenshots 
!
Acceptance testing 
Functional testing of user stories! 
! 
! 
Scenario: As an editor I can translate a document 
Given a site owner 
and a document in English 
When I translate the document into Catalan 
Then I can view the document in Catalan
Acceptance tests 
! 
Integration tests 
! 
! 
! 
Unit tests 
! 
!
Robot Framework 
! 
Keyword driven testing in your own 
domain specific language! 
! 
Extend with Python, Java or XML-RPC 
$ pip install robotframework 
$ pybot —-help 
$ pybot my_test_suite.robot
Robot Framework 
*** Settings *** 
! 
Library string WITH NAME string 
! 
*** Test Cases *** 
! 
Convert string to uppercase 
${value} = string.upper twist and shout! 
Should be equal ${value} TWIST AND SHOUT!
! 
*** Settings *** 
! 
Library ... 
Resource ... 
! 
*** Variables *** 
${NAME} value 
! 
*** Test Cases *** 
Scenario title 
Some keyword argument ${NAME} 
! 
*** Keywords *** 
! 
Some keyword 
[Arguments] ${arg1} ${arg2} 
Another keyword ${arg1} ${arg2} 
! 
! 
test_suite.robot!
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and selenium
Selenium 
Browser automation framework! 
! 
All browser and service logos and trademarks on this slide are property of their respective owners.
Selenium2Library 
Selenium2 (WebDriver) keywords! 
for Robot Framework! 
$ pip install robotframework-selenium2library 
$ pybot —-help 
$ pybot my_selenium_test_suite.robot
Selenium2Library 
*** Settings *** 
! 
Library Selenium2Library 
! 
*** Test Cases *** 
! 
Front-page should contain search box 
Open browser https://www.jyu.fi/ 
Element should be visible 
... css=form[name='searchform'] input 
[Teardown] Close all browsers 
!
Acceptance testing plone sites and add ons with robot framework and selenium
Testing Plone with live data 
[buildout] 
parts += testinstance 
! 
[testinstance] 
recipe = plone.recipe.zope2instance 
... 
eggs = 
... 
zc.beforestorage 
Products.PrintingMailHost 
... 
before-storage = now 
demo-storage = true 
shared-blob = false
Testing Plone add-ons 
*** Settings *** 
! 
Resource plone/app/robotframework/selenium.robot 
Library Remote ${PLONE_URL}/RobotRemote 
! 
*** Test Cases *** 
! 
Scenario: Powered by Plone remains visible 
Open test browser 
Go to ${PLONE_URL} 
Page should contain Powered by Plone 
[Teardown] Close all browsers
Testing Plone add-ons 
import unittest 
! 
import robotsuite 
from myproduct.testing import MYPRODUCT_ROBOT_TESTING 
from plone.testing import layered 
! 
! 
def test_suite(): 
suite = unittest.TestSuite() 
suite.addTests([layered( 
robotsuite.RobotTestSuite(’test_hello.robot'), 
layer=MYPRODUCT_ROBOT_TESTING)]) 
return suite
Testing Plone add-ons 
from plone.testing import z2 
from plone.app.testing import FunctionalTesting 
from plone.app.robotframework.testing import  
REMOTE_LIBRARY_BUNDLE_FIXTURE 
! 
MYPRODUCT_ROBOT_TESTING = FunctionalTesting( 
bases=(MYPRODUCT_FIXTURE, 
REMOTE_LIBRARY_BUNDLE_FIXTURE, 
z2.ZSERVER_FIXTURE), 
name="MyProduct:Robot")
Testing Plone add-ons 
from plone.testing import z2 
from plone.app.testing import FunctionalTesting 
from plone.app.robotframework.testing import  
REMOTE_LIBRARY_BUNDLE_FIXTURE 
! 
MYPRODUCT_ROBOT_TESTING = FunctionalTesting( 
bases=(MYPRODUCT_FIXTURE, 
REMOTE_LIBRARY_BUNDLE_FIXTURE, 
z2.ZSERVER_FIXTURE), 
name="MyProduct:Robot")
Testing Plone add-ons 
http://docs.plone.org/search.html?q=robotframework 
extras_require={ 
'test': [ 
... 
'plone.app.robotframework', 
], 
},
To BDD or not to… 
... 
Scenario: As an editor I can translate a document 
Given a site owner 
and a document in English 
When I translate the document into Catalan 
Then I can view the document in Catalan 
! 
*** Keywords *** 
! 
A site owner 
Enable autologin as Site Administrator 
...
Testing Plone with live data 
! 
eggs = 
... 
plone.app.robotframework 
collective.monkeypatcher 
... 
zcml-additional = 
<configure 
xmlns="http://namespaces.zope.org/zope" 
xmlns:monkey="http://namespaces.plone.org/monkey"> 
<include package="collective.monkeypatcher" /> 
<monkey:patch 
description="Enable Robot Framework remote library" 
class="Products.CMFPlone.Portal.PloneSite" 
original="RobotRemote" 
replacement="plone.app.robotframework.testing.RobotRemote" 
ignoreOriginal="true" 
/> 
</configure> 
REVISITED!
Sphinx integration 
extensions = ['sphinxcontrib_robotframework'] 
.. code:: robotframework 
! 
*** Settings *** 
! 
Library string WITH NAME string 
! 
*** Test Cases *** 
! 
Convert string to uppercase 
...
Acceptance testing plone sites and add ons with robot framework and selenium
$ pip install Sphinx 
$ pip install sphinxcontrib-robotframework 
$ pip install robotframework-selenium2library 
.. figure:: ploneconf.png 
.. code:: robotframework 
! 
*** Settings *** 
! 
Library Selenium2Library 
! 
*** Test Cases *** 
! 
Show Plone Conference 2014 website 
Open browser http://2014.ploneconf.org/ 
Capture page screenshot ploneconf.png 
[Teardown] Close all browsers
Acceptance testing plone sites and add ons with robot framework and selenium
! 
.. figure:: portal-footer.png 
.. code:: robotframework 
! 
*** Settings *** 
! 
Resource plone/app/robotframework/server.robot 
Resource Selenium2Screenshots/keywords.robot 
! 
*** Test Cases *** 
! 
Scenario: Powered by Plone remains visible 
Setup Plone site 
... plone.app.testing.PLONE_ZSERVER 
Go to ${PLONE_URL} 
Page should contain Powered by Plone 
Capture and crop page screenshot 
... portal-footer.png id=portal-footer 
[Teardown] Run keywords 
... Tear down Plone site 
... Close all browsers 
!
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and selenium
More 
+ Robot Framework 
http://robotframework.org/ 
+ Selenium2Library (for Robot Framework) 
https://github.com/rtomac/robotframework-selenium2library 
+ Overview of Plone-related Robot ecosystem 
http://datakurre.pandala.org/2013/09/meet-robot-family- 
for-plone-developers.html

More Related Content

PPTX
Robot Framework
PDF
Appium & Robot Framework
PPTX
Robot framework
PDF
Introduction to Robot Framework
PDF
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
PPTX
Scripting robot
PPT
Robot Framework for beginners and what is new at 2019
PPTX
Robotframework
Robot Framework
Appium & Robot Framework
Robot framework
Introduction to Robot Framework
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
Scripting robot
Robot Framework for beginners and what is new at 2019
Robotframework

What's hot (20)

PPTX
Sphinx + robot framework = documentation as result of functional testing
PDF
Robot framework and selenium2 library
PDF
Network Protocol Testing Using Robot Framework
PDF
Robot Framework Introduction
PDF
Robot framework - Lord of the Rings
PDF
Robot Framework :: Demo login application
PDF
Robot Framework Introduction & Sauce Labs Integration
PPTX
Introduction to robot framework
PDF
Ruin your life using robot framework
PPTX
Robot framework Gowthami Goli
PDF
ATDD Using Robot Framework
PPTX
Robot framework
PDF
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
PPT
Robotframework Presentation - Pinoy Python Meetup 2011January12
PDF
Robot Framework Dos And Don'ts
PDF
Introduction to Robot Framework (external)
PPTX
Integration Group - Robot Framework
PDF
Perl Continous Integration
ODP
Smolder Introduction
Sphinx + robot framework = documentation as result of functional testing
Robot framework and selenium2 library
Network Protocol Testing Using Robot Framework
Robot Framework Introduction
Robot framework - Lord of the Rings
Robot Framework :: Demo login application
Robot Framework Introduction & Sauce Labs Integration
Introduction to robot framework
Ruin your life using robot framework
Robot framework Gowthami Goli
ATDD Using Robot Framework
Robot framework
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
Robotframework Presentation - Pinoy Python Meetup 2011January12
Robot Framework Dos And Don'ts
Introduction to Robot Framework (external)
Integration Group - Robot Framework
Perl Continous Integration
Smolder Introduction
Ad

Viewers also liked (17)

PPTX
Steps to register a foreign invested company
PDF
Functional Tests Automation with Robot Framework
ZIP
Robot Framework Introduction
PPTX
Acceptance Test Driven Development and Robot Framework
PDF
Introduction to Robot Framework
PPTX
Robot Framework : Lord of the Rings By Asheesh M
PPTX
Web testing automation
PDF
手機自動化測試和持續整合
PDF
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
PDF
Automation using RobotFramework for embedded device
PDF
ELA-The Finishing School
ODP
Présentation de Robot framework
PDF
Echelon2010
PDF
Making Add-ons People Will Love
PDF
Browser add-ons
PDF
Robot handles
PPT
Selenium (2)
Steps to register a foreign invested company
Functional Tests Automation with Robot Framework
Robot Framework Introduction
Acceptance Test Driven Development and Robot Framework
Introduction to Robot Framework
Robot Framework : Lord of the Rings By Asheesh M
Web testing automation
手機自動化測試和持續整合
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
Automation using RobotFramework for embedded device
ELA-The Finishing School
Présentation de Robot framework
Echelon2010
Making Add-ons People Will Love
Browser add-ons
Robot handles
Selenium (2)
Ad

Similar to Acceptance testing plone sites and add ons with robot framework and selenium (20)

PPT
10071756.ppt
PDF
Robot framework
PDF
Frequently asked questions answered frequently - but now for the last time
PDF
Rfselenium2 redhat
PPT
Scryent: Plone - Hone Your Test Fu
PDF
Plone Conference 2007: Acceptance Testing In Plone Using Funittest - Maik Röder
KEY
Plone api
PDF
Browser-level testing
PDF
Modern Python Testing
PDF
Plone 5 and machine learning
PPT
Duncan Booth Kupu, Past Present And Future
DOC
Selenium Automation Using Ruby
PPT
Where's the source, Luke? : How to find and debug the code behind Plone
PPTX
Controlling the browser through python and selenium
PDF
selenium-2-mobile-web-testing
PDF
Plone Futures
PDF
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
ODP
Integration Testing in Python
PPT
New in Plone 3.3. What to expect from Plone 4
PDF
The Plone is dead, long live the Plone!
10071756.ppt
Robot framework
Frequently asked questions answered frequently - but now for the last time
Rfselenium2 redhat
Scryent: Plone - Hone Your Test Fu
Plone Conference 2007: Acceptance Testing In Plone Using Funittest - Maik Röder
Plone api
Browser-level testing
Modern Python Testing
Plone 5 and machine learning
Duncan Booth Kupu, Past Present And Future
Selenium Automation Using Ruby
Where's the source, Luke? : How to find and debug the code behind Plone
Controlling the browser through python and selenium
selenium-2-mobile-web-testing
Plone Futures
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
Integration Testing in Python
New in Plone 3.3. What to expect from Plone 4
The Plone is dead, long live the Plone!

More from Asko Soukka (9)

PDF
Bird eye's view on Camunda open source ecosystem
PDF
Embedding BPMN-driven business processes into Plone
PDF
Plone and Volto in a Jamstack project
PDF
Deploying Plone and Volto, the Hard Way
PDF
How Plone Excels in GatsbyJS Content Mesh
PDF
ZServer Reloaded with HTTP/2 and WebSocket Support
PDF
Building instant features with advanced Plone themes
PDF
Nix for Python developers
PDF
Plone, rabbit mq and messaging that just works
Bird eye's view on Camunda open source ecosystem
Embedding BPMN-driven business processes into Plone
Plone and Volto in a Jamstack project
Deploying Plone and Volto, the Hard Way
How Plone Excels in GatsbyJS Content Mesh
ZServer Reloaded with HTTP/2 and WebSocket Support
Building instant features with advanced Plone themes
Nix for Python developers
Plone, rabbit mq and messaging that just works

Recently uploaded (20)

PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
composite construction of structures.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Geodesy 1.pptx...............................................
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPT
Project quality management in manufacturing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
web development for engineering and engineering
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
PPT on Performance Review to get promotions
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
composite construction of structures.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
additive manufacturing of ss316l using mig welding
Geodesy 1.pptx...............................................
Lecture Notes Electrical Wiring System Components
Operating System & Kernel Study Guide-1 - converted.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
bas. eng. economics group 4 presentation 1.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Project quality management in manufacturing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
web development for engineering and engineering
CH1 Production IntroductoryConcepts.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT on Performance Review to get promotions

Acceptance testing plone sites and add ons with robot framework and selenium

  • 1. Acceptance testing! Plone sites and add-ons with Robot Framework! and Selenium Asko Soukka, asko.soukka@iki.fi University of Jyväskylä, Finland
  • 2. Hello! + Asko Soukka Twitter: @datakurre IRC: datakurre Email: asko.soukka@iki.fi Web: datakurre.pandala.org + Software developer at University of Jyväskylä Finland + Plone Foundation Member
  • 3. Menu Terminology! + Acceptance testing + Robot framework + Selenium ! Acceptance testing Plone! + Just do it with a live instance + Do it safely with a dedicated instance + Do it correctly in a p.a.testing sandbox + Do it with while writing your documentation with screenshots !
  • 4. Acceptance testing Functional testing of user stories! ! ! Scenario: As an editor I can translate a document Given a site owner and a document in English When I translate the document into Catalan Then I can view the document in Catalan
  • 5. Acceptance tests ! Integration tests ! ! ! Unit tests ! !
  • 6. Robot Framework ! Keyword driven testing in your own domain specific language! ! Extend with Python, Java or XML-RPC $ pip install robotframework $ pybot —-help $ pybot my_test_suite.robot
  • 7. Robot Framework *** Settings *** ! Library string WITH NAME string ! *** Test Cases *** ! Convert string to uppercase ${value} = string.upper twist and shout! Should be equal ${value} TWIST AND SHOUT!
  • 8. ! *** Settings *** ! Library ... Resource ... ! *** Variables *** ${NAME} value ! *** Test Cases *** Scenario title Some keyword argument ${NAME} ! *** Keywords *** ! Some keyword [Arguments] ${arg1} ${arg2} Another keyword ${arg1} ${arg2} ! ! test_suite.robot!
  • 11. Selenium Browser automation framework! ! All browser and service logos and trademarks on this slide are property of their respective owners.
  • 12. Selenium2Library Selenium2 (WebDriver) keywords! for Robot Framework! $ pip install robotframework-selenium2library $ pybot —-help $ pybot my_selenium_test_suite.robot
  • 13. Selenium2Library *** Settings *** ! Library Selenium2Library ! *** Test Cases *** ! Front-page should contain search box Open browser https://www.jyu.fi/ Element should be visible ... css=form[name='searchform'] input [Teardown] Close all browsers !
  • 15. Testing Plone with live data [buildout] parts += testinstance ! [testinstance] recipe = plone.recipe.zope2instance ... eggs = ... zc.beforestorage Products.PrintingMailHost ... before-storage = now demo-storage = true shared-blob = false
  • 16. Testing Plone add-ons *** Settings *** ! Resource plone/app/robotframework/selenium.robot Library Remote ${PLONE_URL}/RobotRemote ! *** Test Cases *** ! Scenario: Powered by Plone remains visible Open test browser Go to ${PLONE_URL} Page should contain Powered by Plone [Teardown] Close all browsers
  • 17. Testing Plone add-ons import unittest ! import robotsuite from myproduct.testing import MYPRODUCT_ROBOT_TESTING from plone.testing import layered ! ! def test_suite(): suite = unittest.TestSuite() suite.addTests([layered( robotsuite.RobotTestSuite(’test_hello.robot'), layer=MYPRODUCT_ROBOT_TESTING)]) return suite
  • 18. Testing Plone add-ons from plone.testing import z2 from plone.app.testing import FunctionalTesting from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE ! MYPRODUCT_ROBOT_TESTING = FunctionalTesting( bases=(MYPRODUCT_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE, z2.ZSERVER_FIXTURE), name="MyProduct:Robot")
  • 19. Testing Plone add-ons from plone.testing import z2 from plone.app.testing import FunctionalTesting from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE ! MYPRODUCT_ROBOT_TESTING = FunctionalTesting( bases=(MYPRODUCT_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE, z2.ZSERVER_FIXTURE), name="MyProduct:Robot")
  • 20. Testing Plone add-ons http://docs.plone.org/search.html?q=robotframework extras_require={ 'test': [ ... 'plone.app.robotframework', ], },
  • 21. To BDD or not to… ... Scenario: As an editor I can translate a document Given a site owner and a document in English When I translate the document into Catalan Then I can view the document in Catalan ! *** Keywords *** ! A site owner Enable autologin as Site Administrator ...
  • 22. Testing Plone with live data ! eggs = ... plone.app.robotframework collective.monkeypatcher ... zcml-additional = <configure xmlns="http://namespaces.zope.org/zope" xmlns:monkey="http://namespaces.plone.org/monkey"> <include package="collective.monkeypatcher" /> <monkey:patch description="Enable Robot Framework remote library" class="Products.CMFPlone.Portal.PloneSite" original="RobotRemote" replacement="plone.app.robotframework.testing.RobotRemote" ignoreOriginal="true" /> </configure> REVISITED!
  • 23. Sphinx integration extensions = ['sphinxcontrib_robotframework'] .. code:: robotframework ! *** Settings *** ! Library string WITH NAME string ! *** Test Cases *** ! Convert string to uppercase ...
  • 25. $ pip install Sphinx $ pip install sphinxcontrib-robotframework $ pip install robotframework-selenium2library .. figure:: ploneconf.png .. code:: robotframework ! *** Settings *** ! Library Selenium2Library ! *** Test Cases *** ! Show Plone Conference 2014 website Open browser http://2014.ploneconf.org/ Capture page screenshot ploneconf.png [Teardown] Close all browsers
  • 27. ! .. figure:: portal-footer.png .. code:: robotframework ! *** Settings *** ! Resource plone/app/robotframework/server.robot Resource Selenium2Screenshots/keywords.robot ! *** Test Cases *** ! Scenario: Powered by Plone remains visible Setup Plone site ... plone.app.testing.PLONE_ZSERVER Go to ${PLONE_URL} Page should contain Powered by Plone Capture and crop page screenshot ... portal-footer.png id=portal-footer [Teardown] Run keywords ... Tear down Plone site ... Close all browsers !
  • 30. More + Robot Framework http://robotframework.org/ + Selenium2Library (for Robot Framework) https://github.com/rtomac/robotframework-selenium2library + Overview of Plone-related Robot ecosystem http://datakurre.pandala.org/2013/09/meet-robot-family- for-plone-developers.html