tech breakfast at lab49
TRANSCRIPT
![Page 1: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/1.jpg)
BDDBehavior Driven Development
![Page 2: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/2.jpg)
How traditional projects fail
• Delivering Late or Over Budget
• Delivering the Wrong Thing
• Unstable in Production
• Costly to Maintain
![Page 3: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/3.jpg)
Agile
• Individuals and interactions over processes and tools
• Working software over comprehensive documentation
• Customer collaboration over contract negotiation
• Responding to change over following a plan
![Page 4: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/4.jpg)
Cost of going agile
• Outcome-Based Planning
• Streaming Requirements
• Evolving Design
• Changing Existing Code
• Frequent Code Integration
• Continual Regression Testing
• Frequent Production Releases
![Page 5: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/5.jpg)
Three principles of BDD
• Enough is enough - Up-front planning, analysis, and design all have a diminishing return. We shouldn’t do less than we need to get started, but any more than that is wasted effort.
• Deliver stakeholder value - If you are doing something that isn’t either delivering value or increasing your ability to deliver value, stop doing it, and do something else instead.
• It’s all behavior - Whether at the code level, the application level, or beyond, we can use the same thinking and the same linguistic constructs to describe behavior at any level of granularity.
![Page 6: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/6.jpg)
TDD vs BDD
• TDD tests what an object is…
• BDD tests what an object does…
![Page 7: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/7.jpg)
Code Exercise
• Build a Set implementation n java with the following APIs-
• empty()
• size()
• add()
• contains()
• remove()
• Dynamic expansion
![Page 8: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/8.jpg)
Specification Code
Test Runner
Eclipse perspective
![Page 9: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/9.jpg)
empty( ) specification
Name of the test
Pre conditions
Expectation
![Page 10: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/10.jpg)
empty( ) implementation
Just enough to pass test case!!!!
![Page 11: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/11.jpg)
More specifications
![Page 12: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/12.jpg)
Moreimplementation
![Page 13: Tech breakfast at Lab49](https://reader033.vdocuments.net/reader033/viewer/2022042818/55aace971a28abee7a8b4633/html5/thumbnails/13.jpg)
BDDLifecycle