The Drupal Development process is rapid, hardly any day passes with less than 5 patches commited to the core CVS. To ensure a constant high quality of the codebase the simpletest module was introduced during the last Google Summer of Code. It allows to run testcases such as registering a user from a browser's perspective. The output will be "all passed" or a failure description, such as a missing input field. Developers can save significant time by not manually having to go through standard situations and may concentrate on critical situations. A set of core tests has already been crafted and module tests are in development. Unfortunately some of the core tests are currently unmaintained and need to be updated to apply to several changes drupal is passing through.

A keen blog post by merlin suggests to automate the testing further so that every pending patch will be commited to a test setup. By filtering patches through the automated tests the human reviewers may concentrate on auditing the code and checking non-standard situations.

There is a documentation about unit testing with Drupal available that will help to get in touch with the project.

Deliverables

  • Design and build an environment that is capable of automatically installing Drupal and applieing a specified patch. A set of testcases will automatically run in this environment, the result will be returned to the caller.
  • Enhance the Project module by adding the following states: patch (needs automated test), patch (passed automated tests), and patch (failed automated tests). A mechanism such as a cronjob will automatically apply the proposed patches to the test environment.
  • Add additional tests to the current core tests. @TODO Add Ideas here:
  • Update the currently unmaintend tests (Image, Profile, Taxonomy, Upload) so they work in a cvs HEAD environment.

Why choose this project?

This project has many benefits to the Drupal community and a SOC candidate. I will start with community benefits:

  • higher quality code - automated unit testing will help make sure that code that gets checked in at least passes the automated tests which will improve the general quality of code
  • offload repetitive tasks to computers - much time of core developers and QA contributors is spent on the fairly mundane tasks of downloading a patch, trying to apply it, verifying that it applies, and then testing the code. This time could be better spent if the patches were "triaged" and checked for basic functionality before requiring time of QA contributors and core develoeprs.
  • faster moving organization - this system would accelerate the code review process allowing the Drupal team to implement new features faster.
  • tighten the feedback loop for developers - on various occasions a new developer will submit a patch and wait for feedback, perhaps for a long time which can reduce that person's motivation. This automated testing provides near-immediate feedback and, by freeing up time of core developers, should also allow for faster human generated feedback

Benefits to the SOC participant - there are many benefits to the participant, here are some benefits unique to this task.

  • learn more about the QA process - QA is a very important part of the software engineering process, but one that is often overlooked or only lightly discussed in academia. This project gets you right in the middle of a QA process.
  • learn about subjects on the periphery of Drupal like CVS and virtualization - many of the SOC projects will enhance the participants knolwedge of Drupal, MySQL, HTML/CSS, and PHP. This project involves the use of various other related technologies like CVS and virtualization that are enormously important in software engineering.
  • create an automated PHP web-service testing framework - "enough said" - stick that on your resume and you are nearly guaranteed a great job!