Drupal Wishlist

Drupal has a lot of great strengths and some weaknesses

The following are the key areas of Drupal that (as a programmer) I would like to see improved.

Negative testing 

Drupal only seems to test the positive path, that is that given the right inputs you get the right results and apart from security nothing else matters.

The result of this is that incorrect inputs result in silent failures that can be very hard to debug.

Read more

Testing PHP

I had fun this weekend at the PHP London Test Fest, it was a great opportunity to learn something new and meet some great programmers.

Read more

simpletest vs phpunit

There are two main options for unit testing PHP: simpletest and phpunit

They both do a lot of the same stuff, both have the ability to run suites of tests and create mock objects.

Simpletest has a built in webTestCase which allows you to perform some integration as well as unit testing.

Read more

How sure are you that your code doesn't have bugs?

There are times you really really want to be sure your code doesn't have any bugs at all.

This is one of those times.

Read more

The Perils of virtualisation

I just read an interesting article about Windows 7 - it will include a virtual machine to run windows XP for backwards compatibility.

http://www.computerworld.com/action/article.do?command=viewArticleBasic&...

The article points out that this has the drawback of extra maintenance.

I'd have to agree with this - it's one of the big downsides of using virtual machines for testing -  with three virtual Windows' I find myslef constantly having to run updates.

Read more

Selenium IDE exports to PHP

Oh cool :-)

I just noticed that selenium IDE has the option to export tests as PHP unit tests.

This is great - the IDE is a good way to interactively build up tests by recording a set of actions and tweaking what it records. 

And being able to save them as unit tests makes it easy to integrate this with automated testing.

Interestingly they are created as PHPunit tests - not simpletest tests.

Read more

Cross Platform Testing with Selenium and VirtualBox

As well as following standards such as those laid down by www.w3.org I always try and test websites I develop across a range of browsers. Despite improvements in compatibility in recent years, browsers do still vary in implementation and even relatively minor browsers are still used by large numbers of people.

However all this testing can be hard to keep on top of and sometimes I just have to push out what seems like a small code change with only limited testing.

Read more

Nework Error after VirtualBox Upgrade

I decided to upgrade  VirtualBox because the newer versions have much better support for networks that allow virtual computer to be visible on the real network.

But after upgrade I encountered the error

"HostInterface': The attribute 'name' is required but missing."

It seems others have had similar issues

http://forums.virtualbox.org/viewtopic.php?p=58720&sid=f3759d4d938c30120...

I resolved this by deleting this entry:

Read more

Continuous Integration Testing for Drupal with CruiseControl (part 1)

I recently finished work on a project that really suffered from a lack of build tools.

It was a large project, and while many of us were keen on writing tests we weren't able to get management sign of to spend some time automating the test process. So even though we did some of the work we didn't get all the benefits.

It was really frustrating to come back to a piece of work that was well covered by unit tests, only to find those tests broken 

Read more

IE6 on VirtualBox - installing the network driver

One of the trial of web development is ensuring that your site works across a range of browsers.

Standards compliance is an important part of this - but testing cannot be avoided.

I work on Ubuntu, and use VirtualBox together with a licensed copy of Windows XP to test in a Windows environment, which also allows me to at least test the Windows version of Safari.

Unfortunately Microsoft's decision to tie Internet Explorer closely with the operating system means that it isn't possible to install IE6 alongside IE7.

Read more