“The best way to get into the TDD groove is to start practicing. ”
What did we read about?
The week we started part 4 of the book: “Crafting the polyglot project”. We covered two chapters:
- Chapter 11: Test-driven development
- Chapter 12: Build and continuous integration
For test driven development we looked at the the three steps of TDD: Red, Green and Refactor. We also read about the different types of test doubles: Dummies, Stubs, Fakes and Mocks. Two testing frameworks were covered: jUnit and ScalaTest.
For build and continuous integration we looked at why having a standard and repeatable build is so important, remember: “friends don’t let friends build artifacts from the IDE!” We walk through using two widely used tools, Maven 3 for building and Jenkins for CI.
What stood out?
- If you’re new to TDD then the section “TDD in a Nutshell” provides an excellent introduction. If you are familiar with TDD you can happily skip it,
- The section on “Test Doubles” provided an excellent overview. In the earlier chapters it was suggested that you should start introducing new languages through testing. “Introducing ScalaTest” shows you exactly how to get started.
- Colourful introduction to why we need CI, which too many of us will be able to relate to!
If you read nothing else this week…
- “Test Doubles” – If you only ever use Mocks then you should give it a read and expand your toolkit.
- “Code metrics with Maven and Jenkins” – handy if you don’t know about static code analysis.