Simpletestauto module installation instrucitions

Events happening in the community are now at Drupal community events on www.drupal.org.
Rok Žlender's picture

Here you will find all the information you need to setup an environment where you will be able to automatically test patches.

Please use 4.7 branch of my module.

Prerequisites:

  • two installations of drupal 4.7 (can be on same server mutli site installation should work aswell), one is used to get patches (simpletestauto block or from issue tracker) and then sends them to other installation.The other one is used to receive patches and put them in test queue and then run test each one
  • a directory on the server that is writable by apache and accessible by apache from the web. It can be secured to only be accessed from localhost.
  • database user that has permission that are needed by drupal and to create and drop database
  • make sure the following executables can be found in /usr/bin/:
    • cvs
    • mysql
    • mysqladmin
    • patch
    • php
    • sed
    • wget

    these are needed for installing drupal automatically

First you need to setup the server which will handle the actual tests. This is because there is a check when setting up the other server which ensures that the first server is configured properly.

Test server setup:

  1. install and enable simpletestauto module
  2. go to simpletestauto settings page
    1. enter automatic testing server password (this is used as a authentication between these two servers)
    2. extend test server settings
    3. chose yes where it says Is this server used as testing server
    4. type in any additional modules you would like to test ( obviously they need tests)
    5. install dir is the directory in which apache will save test instances
    6. install dir url is the url which points to this directory
  3. set apache environment variables for db_user and db_pass an example is in .htaccess file in simpletestauto module (this is the db user I was talking about in prerequisites)
  4. setup cron so it will run drupal cron.php script
  5. make sure test_it.php script can be accessed from your server i.e. with wget -O - http://www.example.com/modules/simpletestauto/test_it.php

This is about it. Now lets go to the other server

Patch catch server setup:

  1. install and enable simpletestauto module
  2. go to simpletestauto settings page
    1. enter automatic testing server password (the same one as on the first server)
    2. extend Patch server settings
    3. chose yes where it says Is this server used to catch paches
    4. in Automatic testing server url enter an url of the xmlrpc.php file on the test server (this fields is validated so you will know if sth is now working properly)
    5. the last element is a check box Do you want to use hook_nodeapi to catch ... I will talk about this a bit later just remember where it is

Now you have these two servers connected and hopefully working. The question remains how and where to submit patches.
There are two options:

  1. block: you can enable Test your patch block. It can be used to submit already uploaded patches to test server. The interface is pretty simple. You choose which project is patch for which version and url of this patch. When you click submit you will get a new url where you can monitor test progress
  2. new node type: simplestauto module has its own node type. Here you can upload your patch and have it tested. Again you need to fill project and version and attach your patch. For this to work you must check that check box I was talking about before Do you want to use hook_nodeapi to catch .... In this case url to the test progress will be appended to body of this new node.

I think this about covers it. If any of you has any questions please go right ahead.

Comments

Here are some issues that

Rok Žlender's picture

Here are some issues that are causing tests to fail.
http://drupal.org/node/77732
http://drupal.org/node/78737
http://drupal.org/node/73087
Please review them and help if you can.
Thanks

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: