Core now has a 100% testing pass rate!
As of today, after <a href="http://webchick.net/itch-of-the-week/fix-testing-crisis">months</a> of work, all core tests pass.
This means you should be able to download HEAD, install it, enable simpletest module, run all tests from admin/build/testing and see zero failures. If you can't, post a bug report, please.
By no means does this mean HEAD is bug free - we have about <a href="http://coverage.cwgordon.com/coverage/html/2">65% code coverage</a> (much of that implicit rather than explicit), and we actually <a href="http://drupal.org/node/276267#comment-906262">removed</a> two valid tests where they'd been committed without a correlating patch fixing the bug itself. So this is just the beginning of automated testing in core, and where the work really ramps up to make it an indispensable development tool.
The massive, massive advantage to a 100% pass rate is it's going to become much, much easier to spot regressions when patches are committed to core. In fact if we use the tests properly, we'll be able to stop the vast majority of regressions from getting committed at all. Less regressions means shorter code freeze, means longer code thaw!!
At a minimum, running all tests with a patch applied should become standard practice when doing reviews, and you can always check <a href="http://testing.drupal.org/tests" title="http://testing.drupal.org/tests">http://testing.drupal.org/tests</a> to see what it thinks too. That means no patch gets to RTBC (or stays at needs review long) which breaks a test. Got it? ;)
At the moment, tests are only going to catch a percentage of regressions. While they'll never be a panacea to clicking around yourself, and can't tell you if the interface is ugly or the code style is terrible, or measure performance etc., it's a very good first line of defence. We need to ensure that core tests are as comprehensive and robust as possible, since while they're a good first line of defense, 64% coverage is reminiscent of the Maginot line.
To do this, three things need to happen:
1. Write <a href="http://szeged2008.drupalcon.org/program/sessions/testing-part-2-awesome-testing-party">lots of tests</a> to fill in the <a href="http://drupal.org/project/issues?projects=3060&versions=156281&components=tests&states=1,16,8,13,14,15,2,4&priorities=&categories=&users=">gaps in core coverage</a>.
2. <a href="http://groups.drupal.org/node/13990">Get testing.drupal.org working</a>, so it'll sweep the issue queue, test if patches apply, run all tests, and mark issues to code needs work if they fail so we don't have to (my wrists will thank it).
3. Write tests to accompany existing bug fixes and feature requests in the issue queue, to confirm they work properly, and help get them committed more expediently.
So if you haven't got started with the whole testing thing yet, there really is no excuse any more.
This is a huge achievement, and I'm really grateful to all of you who have put in hours and days and weeks of time making it happen. It'll be so much more motivating to write core patches knowing that I'm not doing more harm than good.
- Login or register to post comments
Submitted by ksenzee on Sun, 08/17/2008 - 02:36.