Sphinx is a Python documentation generator, Robot Framework is a test automation framework. These tools combined make documentation a part of the test coverage. Tests are written in human (customer) readable form and the result documentation contains screenshots from product in development.
3. â reStructured text
â Python documentation generator
â Pluggable
â Different outputs
â Standard in Python world
Tools: Sphinx
4. Tools: Robot Framework
â Tests automation framework
â tool for acceptance test-driven development
â keyword-driven testing approach
â Web testing with Selenium2 library
o headless with PhantomJS
5. *** Variables ***
${LOGIN_URL} https://www.python.org/accounts/login/
${HOME_URL} https://www.python.org
*** Keywords ***
Open Browser To Login Page
Open Browser ${LOGIN URL}
Maximize Browser Window
Title Should Be Sign In to Python.org
test.robot(1/2)
6. *** Test Cases ***
Valid Login
Open Browser To Login Page
Input Text id_login demouser
Input Text id_password demopass
Click button css=.primaryAction
Location Should Be ${HOME_URL}
Page Should Contain demouser
Title Should Be Welcome To Python.org
[Teardown] Close Browser
test.robot(2/2)
7. Keywords - selenium2
â âAdd Cookieâ
â âClick Button/Image/Linkâ
â âDrag And Dropâ
â âElement Should Containâ
â âInput Passwordâ
â âMouse Downâ
â âRadio Button Should Be Set Toâ
â âSet Window Sizeâ
13. .. code:: robotframework
*** Settings ***
Resource Selenium2Screenshots/keywords.robot
*** Variables ***
${BASE_URL} = http://pygrunn.org
*** Keywords ***
Suite Teardown
Close All Browsers
docs/: robot.rst
14. Tablet (768x)
===============
.. code:: robotframework
⊠(cut part)
*** Keywords ***
Suite Setup
Open Browser ${BASE_URL}
Set window size 768 900
*** Test Cases ***
.. include:: ../_frontpage.rst
.. include:: ../_topmenu.rst
docs/: tablet/index.rst
15. Initial viewport
----------------
Below we can see the screenshot taken from current pyGrunn.org site.
.. figure:: _screenshots/homepage.png
.. code:: robotframework
Site homepage viewport
Go to ${BASE_URL}
Capture viewport screenshot _screenshots/homepage.png
docs/: _frontpage.rst
19. Cropping and annotations
------------------------
Below we may see cropped and annotated page element.
.. figure:: _screenshots/topmenu.png
.. code:: robotframework
Capture annotated top menu
${note1} = Add pointy note
... css=.headerbar
... This Robot Framework stuff is very very cool!
... width=200 position=bottom
Capture and crop page screenshot _screenshots/topmenu.png
... css=.headerbar ${note1}
docs/: topmenu.rst
20.
21. Useful example
â Plone theme product
â Documentation as part of testing
â Jenkins as visual regression tester
22. Plone product (package/egg)
â plone.app.testing
o fixture of fully working Plone site
â plone.app.robotframework
o Plone-related keywords
29. Useful areas
â Customer documentation
â Visual coverage of theme development
o commit hooks trigger new version
â Multiple versions
o Screen sizes (responsiveness)
o Language versions
ï§ http://www.youtube.com/watch?v=VN9FROZO5AY
o the same application many themes
â FUNCTIONAL TESTING