Saturday 23 March 2013

assertThat(testing, rocks()):

I've been into unit testing for well over 10 years now and TDD for quite a lot of that time.  Back when I started it wasn't really such a big thing and finding JUnit listed on someone's CV was quite rare - this is back when the only book you could get on the subject was Junit Recipes. These days it's pretty much ubiquitous, at least among Java developers, you can buy a whole raft of books and everyone claims to be doing TDD.

Those that know me are aware that I am somewhat of a testing nazi, insisting things are done "The Right Way" and always trying to push my testing knowledge to the limit.  Coupled with my many years of experience, I have a lot to say on the matter.  Over the next few months I plan on telling you all about what I've learned during this time.  I have made many mistakes over the years, and I see these mistakes being made repeatedly by other people, mistakes that lead to brittle, unmaintainable tests which suck to work with.

In the meantime, I'm presenting "I Hate Writing Unit Tests, How Come Everyone Else Enjoys It?" at Devoxx UK at the end of March.  If you find writing tests painful, time consuming or you just don't see how you can write clean, maintainable unit tests - come along, hopefully you'll learn something! I'll be covering:

  • Test naming
  • How to verify your tests
  • What you should/shouldn't be testing
  • Removing duplication
  • Test isolation
  • Mocks vs Fakes and when to use one over the other


If you're not already signed up, you can get a 15% discount using the coupon below.

See you there!