Development Strategic Test-driven · Test Driven Development. How can Development be driven by...
Transcript of Development Strategic Test-driven · Test Driven Development. How can Development be driven by...
![Page 1: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/1.jpg)
Strategic Test-driven Development
join at Slido.com with #testcon2019
![Page 2: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/2.jpg)
Francesco Strazzullo (AKA Strazz)
@TheStrazz86
(Follow me on Twitter!)
Ego Slide
![Page 3: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/3.jpg)
![Page 4: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/4.jpg)
What is Test-driven Development?
![Page 5: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/5.jpg)
![Page 6: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/6.jpg)
![Page 7: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/7.jpg)
Write a failing test
Write code to pass that test
Refactor keeping the test green
![Page 8: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/8.jpg)
![Page 9: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/9.jpg)
![Page 10: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/10.jpg)
![Page 11: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/11.jpg)
Test Driven Development
![Page 12: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/12.jpg)
How can Development be driven by Tests?
![Page 13: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/13.jpg)
Write a failing test
Write code to pass that test
Refactor keeping the test green
![Page 14: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/14.jpg)
A Big Decision is hidden in plain sight
![Page 15: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/15.jpg)
What is the next test to write?
![Page 16: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/16.jpg)
“Software development is a learning process, working code is a side effect. If that’s true… how can we maximize learning?”
Alberto Brandolini
![Page 17: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/17.jpg)
Write the test that lets you learn the most about the
problem
![Page 18: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/18.jpg)
Write the test that lets you reach your goal as fast as
possible
![Page 19: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/19.jpg)
Write a test that lets you
approach the goal
Write code to pass that test
Refactor keeping the test green
![Page 20: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/20.jpg)
Another Big Decision is hidden in plain sight
![Page 21: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/21.jpg)
Write just the code that you need to pass the new test
![Page 22: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/22.jpg)
Write a test that lets you
approach the goal
Write just the code needed to
pass that test
Refactor keeping the test green
![Page 23: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/23.jpg)
Your Design emerges from tests
![Page 24: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/24.jpg)
TDD is a goal oriented decision-making tool based on tests
![Page 25: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/25.jpg)
Test Driven Development
![Page 26: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/26.jpg)
What is a Test?
![Page 27: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/27.jpg)
“Tests are just one form of feedback”
Kent Beck
![Page 28: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/28.jpg)
Feedback Driven Development
![Page 29: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/29.jpg)
Define a feedback that lets you
approach the goal
Build something “small”
Validate your code with “fast” feedbacks
![Page 30: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/30.jpg)
TDD is a goal oriented decision-making tool based on feedbacks
![Page 31: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/31.jpg)
![Page 32: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/32.jpg)
Goal Small Outcome
Feedback
![Page 33: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/33.jpg)
What kind of decisions can you make with TDD?
![Page 34: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/34.jpg)
Strategic long term decisions
Tactical put strategy into action
Operational made daily
![Page 35: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/35.jpg)
How to use TDD “mindset” for Tactical or Strategic
Decisions?
![Page 36: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/36.jpg)
Choosing the next feature
![Page 37: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/37.jpg)
Impact Mapping
![Page 38: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/38.jpg)
Graph by Susanna Ferrario
![Page 39: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/39.jpg)
Choose the impact that you believe
will help the most to reach the goal
Build a small deliverable
Use Metrics to validate your assumptions
![Page 40: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/40.jpg)
Software Architecture
![Page 41: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/41.jpg)
What is the goal of Software Architecture?
![Page 42: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/42.jpg)
Non-functional Requirements
![Page 43: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/43.jpg)
“A non-functional requirement (NFR) is a requirement that specifies criteria that can
be used to judge the operation of a system, rather than specific behaviors.”
Wikipedia
![Page 44: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/44.jpg)
accessibility accountability accuracy adaptability reliability
administrability affordability agility auditability responsiveness
autonomy availability compatibility composability seamlessness
configurability correctness credibility customizability simplicity
debugability self-sustainability robustness dependability sustainability
deployability determinability discoverability distributability usability
durability effectiveness efficiency extensibility repeatability
fault tolerance fidelity flexibility inspectability reusability
reproducibility integrity interoperability learnability securability
maintainability manageability mobility modifiability stability
modularity operability evolvability performances tailorability
portability precision predictability resilience transparency
producibility safety recoverability relevance testability
![Page 45: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/45.jpg)
What are the feedback for Software Architecture?
![Page 46: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/46.jpg)
Fitness Functions
![Page 47: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/47.jpg)
What is a “small outcome” for Software Architecture?
![Page 48: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/48.jpg)
Walking Skeleton
![Page 49: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/49.jpg)
“A Walking Skeleton is a tiny implementation of the system that performs a small end-to-end function. It need not use the final architecture, but it should link together the main architectural components. The architecture and the functionality can then evolve in parallel.”
Alistair Cockburn
![Page 50: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/50.jpg)
Define a set of NFRs to check
with fitness functions
Build a “walking skeleton”
Evolve architecture with fitness functions
![Page 51: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/51.jpg)
We should build this software?
![Page 52: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/52.jpg)
What kind of feedback do we need?
![Page 53: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/53.jpg)
User Research
![Page 54: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/54.jpg)
Define your idea Small Outcome
Use User Feedbacks to validate your idea
![Page 55: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/55.jpg)
Strategic OperationalTactical
![Page 56: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/56.jpg)
Goal Small Outcome
Feedback
![Page 57: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/57.jpg)
In a nutshell...
![Page 58: Development Strategic Test-driven · Test Driven Development. How can Development be driven by Tests? Write a failing test Write code to pass that test Refactor keeping the test green.](https://reader035.fdocuments.net/reader035/viewer/2022071210/6021cecf6996713aba46c3a0/html5/thumbnails/58.jpg)
Learn the rules of the tool
Find the principles that are hidden in the tool
Explore interrelationships between tools