"PYROBOT" is a python wrapper to integrate Sauce and Robot Framework
- Intersects TeamCity Sauce CI plugin parameters to determine which browsers are targeted.
- SAUCE_ONDEMAND_BROWSERS or BROWSER, depending on if single or multiple
- Also runs in standalone mode
- Spawns pybot processes in serial
- Stages each pybot test suite with the target browser
- Browser information is embedded into log
- Concat pybot's resulting output and reports
- A Teamcity build is started, and as such invokes; Sauce CI - Plugin and Pyrobot, the build feature and build step respectively.
- Teamcity will start OnConnect (if selected)
- Pyrobot executes the payload, either a single file or entire directory
- If a directory is provided, the directory contents can be enumerated to allow the files to be ordered.
- The results are placed into pyrobot/workspace under a unique folder, after which the files are consolidated into a single report if multiple browsers were selected in build features
- TODO Sauce REST API integration to show results under 'Sauce Results' tab in teamcity build
- The SauceCI plugin provides either SAUCE_ONDEMAND_BROWSERS or BROWSER, when multiple or single browser selection within the build feature respectively
- These environment vaiables are intersected and intrepreted to provide a remote webdriver instantiation to robot framework
- Pyrobot can be executed from the commandline, using ant, or directly with the python script itself. When in standalone mode, the browser object is created based on the default values in ./PyrobotConfig
vncserver :60 -geometry 1280x1024
orXvfb ...
BASE_URL=http://10.10.9.129/Login/index.php python pyrobot.py dev/spec/01__sauce_browser.txt
- Pybot is executed for each payload specified, and all selected browsers in the Build Feature in Sauce CI.
- The Selenium2Library is augmented to provided integration to the Sauce service (see Pyrobot Robot Framework)
SAUCE_USERNAME = "yourname"
SAUCE_ACCESSKEY = "yourkey"
DEFAULT_SAUCEURL = "sauce-ondemand:?username=%s&access-key=%s&os=Windows 2012 R2&browser=%s&browser-version=11&max-duration=null&idle-timeout=null"
- when executed in standalone, this remote webdriver is instanciated if using sauce
DEFAULT_SOLO_BROWSER = 'firefox'
- when executed in standalone, this remote webdriver is instanciated if using local browser
DEFAULT_BROWSER_DISPLAY = ":60"
BASE_URL = "http://www.google.ca"
- when not provided through ant/python, base_url default here
- Reference the resource file:
Resource ../resources/resource.txt
- Various Invocations:
Open Pyrobot http://www.google.ca __Local Default Browser TestLevel URL__
Open Pyrobot http://www.google.ca chrome __Local Non-Default Browser TestLevel URL__
Open Pyrobot ${PYRO_BROWSER} http://www.google.ca __Sauce Browser TestLevel URL__
Open Pyrobot ${PYRO_BROWSER} __Sauce Browser BaseUrl URL OnConnect__
* above this base_url is OnConnect only