4. 01-10-2015Confidential Page 4
User Story
In order to ….. achieve some goal
As a .... actor
I want to ...... have certain functionality
Scenario: Example
Given….. some situation
When.... perform action
Then...... verify correct behaviour
17. 01-10-2015Confidential Page 17
The Transformation Priority Premise
“As the tests get more specific,
the code gets more generic.”
https://8thlight.com/blog/uncle-bob/2013/05/27/TheTransformationPriorityPremise.html
19. 01-10-2015Confidential Page 19
1. You are here to LEARN.
(and have fun)
2. Try to do your best.
3. Work in pairs.
Find a partner in a similar
programming language
and operating system
21. 01-10-2015Confidential Page 21
1 2
Primefactors:
Factorize a positive integer
number into its prime factors.
Pokerhands:
Determine the winner given
two pokerhands.
22. See you next time: March16th
Test Driven Development
Refactoring
Haarlem Software Developer Meetup
Editor's Notes
Prior to building something you should know What you need to build.Knowing Why is usefull e
Write a failing Acceptance Test first.It will fail and continue to fail for a long time
Start building needed units and once all units are in place the Acceptance Test should start t pass.
In the Acceptance Test you are doing to define the ‘External API’ for the new feature / functionality.
Make it a pretty story!Make your code easy to use by making the API pretty.
TDD: Start by writing a faiing test.
Proof that you can solve the problem!
Close the safety net quickly
Note: It isn’t mandatory to go through all these steps.
But given a state of a codebase knowing these transformation might give a suggestion to the next test.