Test-Driven Development

Overview

Code that is not tested does not work. It’s a mantra that we all should live by and yet, for various reasons, surprisingly few of us actually do.

But there is so much more to upfront testing than verifying the correctness of your code – by paying close attention to the quality of your production and test code you will see huge improvements in the quality of your code. And of course code quality

So while this course is largely about unit testing and refactoring, it is mostly about design and its purpose is to radically alter how you think about and approach about design. We believe that by the end of this course you will not only be more productive, you will also be creating more maintainable and understandable designs.

Recent Feedback

“Awesome insight into TDD and mocking! Tara has a natural talent for teaching and explains very well.”

“Great course. Great lecturer. Learned a lot of new development methods and was able to run these in my own system. Look forward to adding TDD to my future projects”

“Very thorough course on TDD. Delivered with enthusiasm and real industry knowledge at a good pace. A comprehensive mix of introductory and advanced topics. The extensive exercises helped drive home the course content”

Outline

    testing fundamentals

  • programmer testing versus debugging
  • cost and quality
  • white and black-box testing
  • unit testing

  • testing behaviour not methods
  • the xUnit/TestNG family
  • test cases, suites, runners, and fixtures
  • assertions/hamcrest
  • IDE tooling
  • factoring and refactoring

  • intention revealing code
  • understanding test and production code quality
  • removing duplication and redundancy
  • decomposition and delegation
  • code smells
  • common refactorings
  • testing single objects

  • the red, green, refactor rhythm
  • sufficient design
  • faking it
  • obvious implementation
  • testability and isolation

  • loose coupling and high cohesion
  • open closed principle
  • strategies, templates and decorators
  • dependency inversion
  • dependency management
  • testing clusters of objects

  • decoupling techniques; layering, facades, dependency injection
  • interaction versus state based testing
  • pragmatic testing – when and when not to mock
  • static mocks vs dynamic mocks vs stubs
  • designing with interfaces
  • interface discovery through mocking
  • anti-patterns; statics, globals and singletons
  • miscellaneous

  • understanding test quality – writing ‘Good Unit Tests’
  • using DSLs to simplify tests
  • tdd versus design by contract
  • the truth about code coverage
  • continuous integration

Interested?

We are more than happy to discuss any training options with you in detail or help you decide which course is right for you.

To ensure that your specific needs are met, we offer customised versions of all our training courses, as well as pre and post workshop consultancy to help facilitate the introduction of training material into your organisation.

Call our team on: +44 2890 278498
Email us at: enquiries@instil.co