agile software development techniques for daily use
TRANSCRIPT
Agile Software Development Techniques for Daily Use.
What to Do When the Sprint Starts?
What is TDD?
Write a test that use the methods you haven’t written yet.
Test Last
• Hard to write tests• Slow to execute tests• No tests during development• Errors leak to production• Bus factor
Test First / TDD
• Code testability for free• Fast test execution• Controlled development process• No regression• Executable Documentation
Intent
Cost of development
Time
Cost
Traditional
TDD
Your turn …
• What to do?– develop SET
• How?– Java– TDD with JUnit–Methods: size, add, contains, remove– Storage: fixed size array
Example
Your turn …
• What to do?– develop SET
• What’s left?– size– contains– add– remove
TDD = Safety net
Legacy Code
Code without tests
Working with Legacy Code
• Make code testable• Capture behaviour• Refactor• Add features using TDD
Example
Your turn … 1/2
• What to do?–Write a test
• How?– Understand the code–Write a test• Minimal code change• No bug fixes
Your turn … 2/2
• What to do?– Scrap item• In stock items only• Number of scrapped
• How?– TDD– Refactoring– Bugs
Our solution
https://github.com/gsabev/ista2014
Literature