I just got back from JOIN (Jornadas de Informatica) 2005, a little student run conference at the University of Minho in Portugal. Why this might be of interest is its the same place and largely the same folks who will be running YAPC::Europe. http://natura.di.uminho.pt/join2005/out/news_en.html
I was asked to give something about testing to an audience of undergraduate informatics students, largely Haskell and maybe some Java. What I finally came up with is this: http://www.pobox.com/~schwern/talks/Why_Test/ I had 45 minutes to say something about testing and decided all I could do was expose them to the subject, since its not part of their coursework, and try to get them interested to so some work on their own. The audience being inexperienced at programming and not Perl programmers meant I couldn't go into much detail. Additionally since they're students and/or academics it doesn't help much to talk about business reasons for testing. So I went for the most basic, convincing reasons to write tests: how it will benefit the lone wolf programmer. Selfish reasons. The reasons most likely to convince someone who would otherwise just look at testing as just more work. There's really nothing there which hasn't been said before, not the best talk in the universe, but its nice to have it all layed out if nothing else than to help convince your co-workers. So, what's wrong with it? While I thought about what I wanted to say for months I ultimately wrote the slides the night before the talk. :) I forgot one important argument: testing lets you optimize/redesign without fear. The whole "fear based programming" problem. There's almost no pictures. There's not nearly enough references, particularly when I expect the audience to go out and work things out on their own. I still can't think of a decent testing book nor tutorial to recommend. Test::Tutorial leaves the reader at a dead end without referencing further works on, say, perl.com. I don't know the JUnit community to recommend anything there. There's not nearly enough examples. I avoided code to avoid confusing the audience with a bunch of Perl and to keep things focused on ideas rather than implementation. I only had 45 minutes. From the questions I got I believe this left people without a clear concept of what a test was. Or how "big" a test should be or how much a single test should cover. One question was how tests should be divided up for which I used the WWW::Mechanize test suite as an example. During the break after the talk, but while I still had my laptop plugged into the projector, I was demonstrating Devel::Cover's test coverage ability and noticed quite a number of folks in the audience were rather interested in whatever it was I was doing. I don't know if it was the pretty colors on the HTML page or what but it seems to be a fairly powerful demonstration. Anyhow, there it is.