Test Education: The Writing is On the Wall

A few days ago, I launched a very simple Twitter poll.

Andy_Zaidman_on_Twitter___Software_engineers__how_did__software_testing__education_happen_for_you__If__none_of_the_choices__applies_to_you__tweet_me___-__Thanks__

As the results show, around half of the 60 respondents answered they learned about software testing “on the job”. Obviously, this is but a Twitter poll, but it strengthens some intuitions about testing: why are people doing so little testing. And before you go into that, there are many, many factors that influence this.

But let’s focus on CS education for a minute. Many computer science curricula do not contain a dedicated testing course. I have no firm evidence of this, but I looked at quite a few curricula. Instead, these universities opt for a more spread-out way of teaching testing. A bit of testing is taught during the introduction course on programming, a bit during their software engineering class and the rest will just come with the many projects students are doing.  I am absolutely not saying that this is a wrong strategy, but some important thoughts here:

  • are we sure that students get the importance of testing when it is just a tiny topic in one or two courses?
  • are we sure that students actual do software testing in their projects?
  • are we sure that students are sufficiently trained in testing? This goes from professors knowing what exactly is taught w.r.t. testing in each of the courses…

Back to my Twitter poll, I also got a lot of feedback (thanks for that!). Part of that feedback was a pointer to a paper entitled “The Impact of Software Testing Education on Code Reliability: An Empirical Assessment” (see the paper here (unfortunately behind paywall)). While the paper contains many interesting insights and some good arguments, the thing that struck me most is their observation that CS teachers are not always well-trained in testing themselves (while their way of measuring this might be questionable, might perhaps be too theoretical). This is frightening if you ask me.

At TU Delft, we start by teaching the students to write very simple unit tests in week 3 of their first year. Programming assignments without any unit tests are simply rejected. The project that immediately follows their basic programming courses is again test-focused. The real testing course then comes at the end of their first year, where @avandeursen teaches them the basic of testing. At the Master level we have a dedicated “advanced software testing” course. I am absolutely not saying that his is the way to go, but we do hope it shows students that testing is not something you might want to do, it is something that is essential.

If we are every going to produce software engineers capable of writing reliable software, the writing is on the wall if you ask me.