[development] Drupal Test Suite
Nimish Pachapurkar
npac at spikesource.com
Wed May 3 00:26:59 UTC 2006
I had thought about the idea of disintegrating the tests based on the
module. However, the test are functional in nature, and this approach
will work better for Unit tests, IMHO. Some of the tests may need more
than one module configured and working to get them to run.
I am afraid, I do not have many cycles just yet to try and get the suite
to work with Drupal 4.7. The amount of work needed will depend on how
much the UI has changed.
We did uncover a couple of bugs with PostgreSQL which I have already
submitted patches to.
Thanks,
Nimish
Moshe Weitzman wrote:
> Sounds very interesting. Did you uncover bugs in the modulesn and contribute
> fixes? They could not all have passed all tests.
>
> The right way to integrate your work into Drupal project is to move the
> tests into a 'tests' subdirectory of each of those modules. Then you need a
> brief implementation of hook_simpletest in the module itself. See
> http://drupal.org/simpletest for docs. The organic groups module (i.e.
> Og.module) is an example of a contrib module which implements this hook and
> currently ships with tests (HEAD/4.7 only). I encourage more contrib modules
> to follow its lead.
>
> Also, you will want to update your tests for 4.7 which is very near.
>
>
> On 4/28/06 2:05 PM, "Nimish Pachapurkar" <npac at spikesource.com> wrote:
>
>> Hello,
>>
>> Some months ago, I had inquired about the current state of the Drupal
>> test suite in this forum. At that time there were some issues in running
>> the simpletest module for Drupal 4.6.5.
>>
>> A team at SpikeSource, Inc. (http://www.spikesource.com) - where I work
>> - has recently developed a test suite for Drupal that comprises of 5925
>> functional tests that exercise more than 50% of the code. This test
>> suite runs against both MySQL and PostgreSQL back ends.
>>
>> The test suite is developed using following open source tools:
>>
>> * TestGen4Web: Used for recording user actions through browser and
>> then translating them into SimpleTest test cases.
>> http://developer.spikesource.com/projects/testgen4web/
>>
>> * SimpleTest: PHP unit and functional testing tool.
>> (http://www.lastcraft.com/simple_test.php)
>>
>> * PHPCoverage: PHP line coverage measurement tool.
>> (http://developer.spikesource.com/projects/phpcoverage/)
>>
>> Currently, the test suite works against a deployed and configured
>> instance of Drupal 4.6.6 with 99.98% tests passing. (SimpleTest counts
>> each assertion as a test case.) The test suite covers following modules
>> in addition to the core modules.
>>
>> * article
>> * event
>> * fckeditor
>> * flexinode
>> * image
>> * img_assist
>>
>> We would like to contribute this test suite so that more people can add
>> to it and improve it.
>>
>> Please let me know if anyone might be interested in taking a look at it
>> and carrying this discussion forward.
>>
>> Thanks,
>> Nimish
>>
>> --
>> SpikeSource, Inc.
>
>
More information about the development
mailing list