pip install robotframework
*** Settings ***
Library Dialogs
*** Variables ***
${CORRECT_ANSWER} 42
*** Test Cases ***
Ask the ultimate question
${answer} = Get value from user
... How much is the fish?
Should be equal ${answer} ${CORRECT_ANSWER}
pybot test_hello.robot

==================================
Ask the ultimate question | FAIL |
1 != 42
----------------------------------
Ask the ultimate question
${answer} = Ask the question
Check the answer ${answer}
*** Keywords ***
Ask the question
${answer} = Get value from user
... How much is the fish?
[return] ${answer}
Check the answer
[arguments] ${answer}
Should be equal ${answer} ${CORRECT_ANSWER}
pip install robotframework-selenium2library
python -m SimpleHTTPServer
pybot test_mockup.robot
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import FunctionalTesting
from plone.testing import z2
PLONE_ROBOT_TESTING = FunctionalTesting(
bases=(PLONE_FIXTURE, z2.ZSERVER_FIXTURE),
name="Plone:Robot"
)
# (this is plone.app.testing.PLONE_ZSERVER)
*** Settings ***
Resource plone/app/robotframework/selenium.robot
Test Setup Open test browser
Test Teardown Close all browsers
*** Test Cases ***
I see Plone
Go to ${PLONE_URL}
Page should contain Powered by Plone
[robot]
recipe = zc.recipe.egg
eggs =
Pillow
${test:eggs}
plone.app.robotframework[reload]
bin/robot-server plone.app.testing.PLONE_ZSERVER
can reload your code
bin/robot hello-plone.robot
supports test isolation
import unittest
import robotsuite
from plone.app.testing import PLONE_ZSERVER
from plone.testing import layered
def test_suite():
suite = unittest.TestSuite()
suite.addTests([
layered(robotsuite.RobotTestSuite('test_hello.robot'),
layer=PLONE_ZSERVER),
])
return suite
*** Settings ***
Resource plone/app/robotframework/selenium.robot
Library Remote ${PLONE_URL}/RobotRemote
Test Setup Open test browser
Test Teardown Close all browsers
*** Test cases ***
Contributor cannot access control panel
Enable autologin as Contributor
Go to ${PLONE_URL}
Click link css=#user-name
Element should not be visible css=#personaltools-plone_setup
from plone.app.testing import PLONE_ZSERVER
from plone.app.testing import FunctionalTesting
from plone.app.robotframework.testing import AUTOLOGIN_LIBRARY_FIXTURE
AUTOLOGIN_ROBOT_TESTING = FunctionalTesting(
bases=(AUTOLOGIN_LIBRARY_FIXTURE, PLONE_ZSERVER),
name="AutoLogin:Robot"
)
*** Settings ***
Resource plone/app/robotframework/selenium.robot
Resource plone/app/robotframework/saucelabs.robot
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers
[robot]
recipe = zc.recipe.egg
eggs =
Pillow
${test:eggs}
plone.app.robotframework[ride,reload]
/usr/bin/python bin/ride

See also: http://openetherpad.org/9w0hiLR8kI