[development] Very important testing update

Karoly Negyesi karoly at negyesi.net
Thu Apr 24 06:05:10 UTC 2008


Hi,

Yesterday we had quite a discussion on IRC which is summed up
http://groups.drupal.org/node/10957 . Basically, mock functions were
voted down as tests based on them takes too much developer resources
to write and maintain. Instead, we are writing functional testing on
an API level as described on http://drupal.org/node/30008 , for
example:

$this->assertEqual(l('Some page', 'node/34', array('class' =>
'foobar')), '<a href="/node/34" class="foobar">some page</a>');

This test presumes and verifies somewhat that every function l calls
is working correctly. Whether this still can be called unit testing or
not is a pointless academic debate :)

I expect that a number of tasks will be placed in the Drupal issue
queue telling the community which tests are to be written. When this
happens, I guess another email will land here and also I guess at
various other places... I also plan to hold a 'testing hour' every
single day starting probably next week.

Stay tuned!

Karoly Negyesi


More information about the development mailing list