TDD for the rest of us

Preview:

Citation preview

@gil_zilberfeld

ROMANIANTESTINGCONFERENCE2016

TDD for the rest of us

Gil Zilberfeld

@gil_zilberfeld

Hello!

I AM GIL ZILBERFELD

www.gilzilberfeld.comwww.everydayunittesting.com

@gil_zilberfeld

@gil_zilberfeld

Test Driven Development

Or is it Test Driven Design?

@gil_zilberfeld

The TDD Cycle

@gil_zilberfeld

Let’s build a lightsaber!

@gil_zilberfeld

What are the requirements?

@gil_zilberfeld

Let’s build it!

@gil_zilberfeld

Let’s build a better lightsaber!

@gil_zilberfeld

What are the new requirements?

@gil_zilberfeld

BENEFITSSame tools Better coverageLess debuggingBetter designThink before your code!

You can also split your content

ISSUESRequires disciplineWorks better for greenfield projectsTakes time to get to great results

The light side vs the dark side

@gil_zilberfeld

Plan aheadDefine boundariesSmall stepsSmallest amount of code to pass the testJUST to pass the testFocus on the current testAsk questionsDiscipline, discipline, discipline!

You can also split your contentYoda says…

@gil_zilberfeld

Not every project is lightsaber size

@gil_zilberfeld

COMPONENTSNavigationShieldsEnvironmentWeaponsEnergyTIE Fighters

You can also split your content

ACCEPTANCEDivide and conquerInteraction and boundariesTesting strategyBDD

Our Death Star is composed of smaller things

@gil_zilberfeld

Summary

◉ Try it!◉ In a team◉ How about BDD?◉ And remember…

@gil_zilberfeld

A death star with no tests is very dangerous!

@gil_zilberfeld

May the Force be with you!

ANY QUESTIONS?

You can find me at:@gil_zilberfeld

http://www.GilZilberfeld.comhttp://www.EverydayUnitTesting.com