Treffen Sie uns auf einer Konferenz!

Verschaffen Sie sich einen Überblick, auf welchen Events unsere codecentric-Kollegen als Referenten vertreten sind. Wir würden uns freuen, Sie auf einer Konferenz persönlich begrüßen zu dürfen.

Fake It Outside – In TDD


Clean Code Days

Hotel NH München Ost Conference Center, Einsteinring, Aschheim, Deutschland

In the context of bigger systems classic emergent design can result in losing a lot of time by letting similar responsibilities emerge again and again. In contrast the London School of TDD works Outside-In using mocks. It shines whenever the objects‘ responsibilities are quite clear upfront. An alternative I’ve developed over the last year is „Fake It Outside-In TDD“. Instead of mocks fake data originating from the test assertion become your primary design driver. On an incremental destructuring journey down the call stack the data morphs more and more into structure. Design develops „Outside-In“ but on a „green bar“ in the refactoring phase as opposed to London Style on a „red bar“ when writing your tests. The remaining real „logic“ is tackled with regular unit-test level TDD.

The approach hits the sweet spot

  • when there is little complexity in the interactions,
  • when the structure is complex or
  • when design skills aren’t very sophisticated yet or when teachability of TDD is important.

The session starts by explaining the different TDD approaches including the „Fake It Outside-In“ variant. In a pair-programming session we then try out the new approach, followed by a discussion of our observations and opinions regarding the approach. The session ends with a comparison of the respective TDD approaches’ strengths and weaknesses.

David VölkelDavid Völkel