= Continuous Integration = [[TOC]] == Current Setup == CI Server runs the tests every 6 hours (crontab -e currently) * Using Trunk Web2Py * Using Trunk Eden * Using IFRC template * Using PostgreSQL * Using Chrome Results are stored as HTML files in the filesystem which can be accessed via the Eden instance under test: * http://82.71.213.53/eden/admin/result {{{/etc/cron.custom/testsuite}}} * Prepares Server (?) * Updates Web2Py to current Trunk (from github.com/web2py/web2py) * Updates Eden to current Trunk (from github.com/flavour/eden) * Deletes prepopulated data * Loads all models * Fixes permissions of the web2py folder * Runs Functional Tests (Selenium) * Runs Smoke Tests * Runs Roles Tests (Disabled for some reason) * Mails out test results (using /usr/local/bin/mailTestResults.sh) To run the test suite manually: {{{ sudo sh /usr/local/bin/web2pystarter }}} Open another console then: {{{ sudo sh /etc/cron.custom/testsuite }}} To just run smoke tests: {{{ cd /home/web2py xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --html-path /home/web2py/applications/eden/static/test_smoke/ --suite smoke --force-debug --link-depth 16 -V 4 }}} Start Window based applications (x11): * If the GUI window of the application is of no interest to you: {{{#!sh xvfb-run -a *test commands here* }}} For example : {{{#!sh xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A -V 2 }}} '''Note''': Xvfb basically makes a virtual display which isn't displayed anywhere. Xserver itself actually requires a real display * If you want to see the GUI interface of the application * If the machine you use to ssh into the server, has X Server installed, then you can access the GUI window by using the -X flag when loggin into the server {{{#!sh ssh -X youraccount@82.71.213.53 }}} And now, if you simply execute any application which has a Xserver attached to it, it will be displayed on your screen. == Plans for Future == * ~~Move mailing script out of a personal user directory~~ * ~~Move cron commands to system /etc/crontab rather than root's crontab~~ * More templates * More databases * More browsers * Install an Eden instance to act as a CI server * Move the cron scripts to being run by Eden Scheduler * Have Eden manage the mailing of results & manage subscriptions * Have Eden store the results in the database for Graphical analysis We also have an install of [SysAdmin/Jenkins Jenkins] which could be configured to run these scripts & report results. Setup Notes & Discussions (to be ported to Wiki): * https://docs.google.com/document/d/1T29cF3kkK4lIAVdiATfE8a-tLm_Tyh3_dIh6FJWY7sU/edit