Skip to main content


Showing posts from September, 2007

actual code: create vs. sort

Grig and Simon are both still suspicious, so here is an example from the test itself:

This is Selenium RC in a keyword-driven framework where test data is in the wiki. Take a look at the "code" below and I hope you agree that an explicit test for creating a record is not worthwhile.

Any of these could fail in the setup, even though there is no explicit assertion about success:

| clickAndWait | link=Accounts | |
| type | name | 0sort1account%%start_time%% |
| st-submit | | |
| clickAndWait | link=Accounts | |
| type | name | 0sort2account%%start_time%% |
| st-submit | | |
| clickAndWait | link=Accounts | |
| type | name | 0sort3account%%start_time%% |
| st-submit | | |

and even if those didn't trigger a failure, these other assertions about sorting would fail in a really obvious way if any of the three records were missing:

| open | /nlw/control/account | |
| text_like | qr/sort1account.+sort2account.+sort3account/ | |
| clickAndWait | link=Name | |
| text_like | qr/sort3…

don't test for blocking conditions: an example

Matt Heusser quoted me on this at the Google Test Automation Conference. I've had this idea for some time, that many tests both manual and automated waste time explicitly testing for conditions that don't need tests.

I ran into one of those today. Or rather, my boss did. (He's not really a boss so much as he is an experienced colleague who has more conversations with management than me. Socialtext has very little hierarchy. )

We have a lot of automated tests that we created very quickly. Many of them have TODOs left over. I've been cleaning up the tests and implementing the TODOs.

One of the tests had a whole list of TODOs that had already been done, so I deleted the TODO list. My boss saw this and asked me why. In particular, one of the TODOs had been to create a record of a particular type, and my boss didn't see a test for this.

I pointed out that I had written an explicit test for sorting records of exactly that type, and three records of that type were …

Become a better software artist

There's been an interesting discussion on the software-testing mail list about the failures of Six Sigma and other process-quality religions to map effectively to software development. I think you might get better software the same way that you get better music.


Almost every musician starts by playing along with recordings. After that, playing along with the radio builds improvisation skills. After that, playing along with other people broadens and deepens the communication spectrum. Throughout all this, work on the basics like scales and chords and tempo don't stop. The conscientious musician practices as many styles of music as possible. The professional musician may not enjoy blues, or orchestral works, or jazz, but there are certain forms that all professionals master in order simply to be professional.


Music is constructed for listeners. Rehearsal is where the details of the performance are designed and implemented. Rehearsal is not where musicia…