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!
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 
!
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 
...
$ 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
! 
.. 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 
!
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

What's hot

Sphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testingSphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testing
plewicki
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
krishantha_samaraweera
 
Network Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot FrameworkNetwork Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot Framework
Payal Jain
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the Rings
Asheesh Mehdiratta
 
Robot Framework :: Demo login application
Robot Framework :: Demo login applicationRobot Framework :: Demo login application
Robot Framework :: Demo login application
Somkiat Puisungnoen
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Introduction to robot framework
Introduction to robot frameworkIntroduction to robot framework
Introduction to robot framework
Chonlasith Jucksriporn
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
Prayoch Rujira
 
Robot framework Gowthami Goli
Robot framework Gowthami GoliRobot framework Gowthami Goli
Robot framework Gowthami Goli
Gowthami Buddi
 
ATDD Using Robot Framework
ATDD Using Robot FrameworkATDD Using Robot Framework
ATDD Using Robot Framework
Pekka Klärck
 
Robot framework
Robot frameworkRobot framework
Robot framework
boriau
 
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
Xebia Nederland BV
 
Robotframework Presentation - Pinoy Python Meetup 2011January12
Robotframework Presentation - Pinoy Python Meetup 2011January12Robotframework Presentation - Pinoy Python Meetup 2011January12
Robotframework Presentation - Pinoy Python Meetup 2011January12
Franz Allan See
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
Pekka Klärck
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
Zhe Li
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
OpenDaylight
 
Robot framework
Robot frameworkRobot framework
Perl Continous Integration
Perl Continous IntegrationPerl Continous Integration
Perl Continous Integration
Michael Peters
 
Smolder Introduction
Smolder IntroductionSmolder Introduction
Smolder Introduction
Michael Peters
 

What's hot (20)

Sphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testingSphinx + robot framework = documentation as result of functional testing
Sphinx + robot framework = documentation as result of functional testing
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
 
Network Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot FrameworkNetwork Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot Framework
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the Rings
 
Robot Framework :: Demo login application
Robot Framework :: Demo login applicationRobot Framework :: Demo login application
Robot Framework :: Demo login application
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
 
Introduction to robot framework
Introduction to robot frameworkIntroduction to robot framework
Introduction to robot framework
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
 
Robot framework Gowthami Goli
Robot framework Gowthami GoliRobot framework Gowthami Goli
Robot framework Gowthami Goli
 
ATDD Using Robot Framework
ATDD Using Robot FrameworkATDD Using Robot Framework
ATDD Using Robot Framework
 
Robot framework
Robot frameworkRobot framework
Robot framework
 
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
 
Robotframework Presentation - Pinoy Python Meetup 2011January12
Robotframework Presentation - Pinoy Python Meetup 2011January12Robotframework Presentation - Pinoy Python Meetup 2011January12
Robotframework Presentation - Pinoy Python Meetup 2011January12
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
 
Robot framework
Robot frameworkRobot framework
Robot framework
 
Perl Continous Integration
Perl Continous IntegrationPerl Continous Integration
Perl Continous Integration
 
Smolder Introduction
Smolder IntroductionSmolder Introduction
Smolder Introduction
 

Viewers also liked

Steps to register a foreign invested company
Steps to register a foreign invested companySteps to register a foreign invested company
Steps to register a foreign invested company
Б. Нарангэрэл
 
Functional Tests Automation with Robot Framework
Functional Tests Automation with Robot FrameworkFunctional Tests Automation with Robot Framework
Functional Tests Automation with Robot Framework
laurent bristiel
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
laurent bristiel
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
Carl Su
 
Robot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh MRobot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh M
Agile Testing Alliance
 
Web testing automation
Web testing automationWeb testing automation
Web testing automation
kuozui
 
手機自動化測試和持續整合
手機自動化測試和持續整合手機自動化測試和持續整合
手機自動化測試和持續整合
Carl Su
 
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website FootprintsSEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
Mark D. Griffin
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
Srix Sriramkumar
 
ELA-The Finishing School
ELA-The Finishing SchoolELA-The Finishing School
ELA-The Finishing School
Amitesh Kumar
 
Présentation de Robot framework
Présentation de Robot frameworkPrésentation de Robot framework
Présentation de Robot frameworkgilleslenfant
 
Echelon2010
Echelon2010Echelon2010
Echelon2010
Gen Kanai
 
Making Add-ons People Will Love
Making Add-ons People Will LoveMaking Add-ons People Will Love
Making Add-ons People Will Love
Justin Scott
 
Robot handles
Robot handlesRobot handles
Robot handles
RiverGlide
 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
onlinemindq
 

Viewers also liked (17)

Steps to register a foreign invested company
Steps to register a foreign invested companySteps to register a foreign invested company
Steps to register a foreign invested company
 
Functional Tests Automation with Robot Framework
Functional Tests Automation with Robot FrameworkFunctional Tests Automation with Robot Framework
Functional Tests Automation with Robot Framework
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
Robot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh MRobot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh M
 
Web testing automation
Web testing automationWeb testing automation
Web testing automation
 
手機自動化測試和持續整合
手機自動化測試和持續整合手機自動化測試和持續整合
手機自動化測試和持續整合
 
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website FootprintsSEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
SEO Footprints by www.Netrix.co.uk - Comprehensive Guide to Website Footprints
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
 
ELA-The Finishing School
ELA-The Finishing SchoolELA-The Finishing School
ELA-The Finishing School
 
Présentation de Robot framework
Présentation de Robot frameworkPrésentation de Robot framework
Présentation de Robot framework
 
Echelon2010
Echelon2010Echelon2010
Echelon2010
 
Making Add-ons People Will Love
Making Add-ons People Will LoveMaking Add-ons People Will Love
Making Add-ons People Will Love
 
Browser add-ons
Browser add-onsBrowser add-ons
Browser add-ons
 
Robot handles
Robot handlesRobot handles
Robot handles
 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
 

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

Getting Started with Pelican
Getting Started with PelicanGetting Started with Pelican
Getting Started with Pelican
Nazrul Kamaruddin
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Ondřej Machulda
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
Alfresco Software
 
Browser-level testing
Browser-level testingBrowser-level testing
Browser-level testing
Martin Kleppmann
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
Javier López
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
Javier López
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
rijk.stofberg
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
n|u - The Open Security Community
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11julien.ponge
 
Phing
PhingPhing
Phing
mdekrijger
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suiteericholscher
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
Nicolas Fränkel
 
Introduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI PotsdamIntroduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI Potsdam
Christoph Oelmüller
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
menttes
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123Parag Gajbhiye
 
Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?
Tobias Schneck
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
Vincenzo Barone
 
Selenium
SeleniumSelenium
Selenium
Ruturaj Doshi
 

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

Getting Started with Pelican
Getting Started with PelicanGetting Started with Pelican
Getting Started with Pelican
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Browser-level testing
Browser-level testingBrowser-level testing
Browser-level testing
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11
 
Phing
PhingPhing
Phing
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suite
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Introduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI PotsdamIntroduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI Potsdam
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123
 
Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
Selenium
SeleniumSelenium
Selenium
 

More from Asko Soukka

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

More from Asko Soukka (9)

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

Recently uploaded

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 

Recently uploaded (20)

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 

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!
  • 9.
  • 10.
  • 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 !
  • 14.
  • 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 ...
  • 24.
  • 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
  • 26.
  • 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 !
  • 28.
  • 29.
  • 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