SlideShare a Scribd company logo
Designing with Expectations, not
Implementations
Harshith Shetty
Test
● When to write tests?
● Does your test run fast?
Why TDD?
● Ask
● Describe
● Fulfill
● Move on
Approach
Ask (what it’ll do)
● Expectations from the feature
● Clarity
● Documentation
Describe (how it’ll do)
● Interfaces of the feature
● Relationship between objects
● Flow of the feature
● Knowing when it’s done
Some Mocks:
Examples:
Fulfill (make it do)
● Implementation of feature
● Decoupled code
● Separation of business Logic from platform
● Faster feedback
TDD - Designing with Expectations, not Implementations
Move on
*Test
*You
Move on
● Regression tests
Real life scenario
3 buttons x
7 states x
3 user types x
2 experiments
= 126 cases
TDD - Designing with Expectations, not Implementations
*Refactoring
*New Features
*You
*Changing
Requirements
*Legacy code
TDD - Designing with Expectations, not Implementations
3 Laws of TDD
● You must write a failing test before you write any
production code.
- Robert C. Martin (Uncle Bob)
● You must not write more of a test than is sufficient to
fail, or fail to compile.
● You must not write more production code than is
sufficient to make the currently failing test pass.
Benefits
● Documented code
● Better code reviews
● Rewarding
● Refactor with Confidence
● Faster development cycles
● Less Debugging
Notes
● Always test the interfaces, Requirements are stable,
implementations are not.
● Follow a clean architecture.
● Practice. Practice. Practice. Make it a habit.
● Split the code, if tests become more.
● If not for product, do it for you.
● If not for you, do it for the next developer.
Examples:
Examples:
Examples:
● @har5hit
● @ShaadiTech
Contact
● “Ruby Midwest 2011 - Keynote: Architecture the Lost Years
by Robert Martin”
https://www.youtube.com/watch?v=WpkDN78P884
● “The Three Laws of TDD (Featuring Kotlin)”
https://www.youtube.com/watch?v=qkblc5WRn-U
● Growing Object-Oriented Software: Guided By Tests
by Steve Freeman
References

More Related Content

PPTX
PDF
TDD with Ruby
PDF
Pragmatic Introduction to PHP Unit Testing (2015)
PDF
Test Driven Development en Go con Ginkgo y Gomega
PPTX
【Edd workshop@140725】TDD introduction_Andy Huang
PPT
Getting Unstuck: Working with Legacy Code and Data
PDF
Is this how you hate unit testing?
PDF
Test Driven Development
TDD with Ruby
Pragmatic Introduction to PHP Unit Testing (2015)
Test Driven Development en Go con Ginkgo y Gomega
【Edd workshop@140725】TDD introduction_Andy Huang
Getting Unstuck: Working with Legacy Code and Data
Is this how you hate unit testing?
Test Driven Development

What's hot (20)

PDF
Unit testing (workshop)
PPT
TDD In Practice
PDF
Tdd in swift
PDF
Test-Driven Development (TDD) in Swift
PDF
Giving automated tests the love they deserve at Listings
PPTX
Mocking in python
PDF
[SRD UGM] Sharing Session - Software Testing
PDF
Effective Unit Testing
PDF
TDD reloaded - JUGTAA 24 Ottobre 2012
PPTX
Working Effectively with Legacy Code
PPTX
Real Life Unit Testing
PPTX
Workshop: Unit Testing in Python
PPTX
Put the Tests Before the Code
PDF
Unit testing
PPTX
Working with Legacy Code
PDF
Working With Legacy Code
PPTX
An Introduction to Unit Testing
PPTX
Mixing testing types to improve your testing results
PPTX
An Overview of automated testing (1)
PPTX
Quality assurance in the early stages of the product
Unit testing (workshop)
TDD In Practice
Tdd in swift
Test-Driven Development (TDD) in Swift
Giving automated tests the love they deserve at Listings
Mocking in python
[SRD UGM] Sharing Session - Software Testing
Effective Unit Testing
TDD reloaded - JUGTAA 24 Ottobre 2012
Working Effectively with Legacy Code
Real Life Unit Testing
Workshop: Unit Testing in Python
Put the Tests Before the Code
Unit testing
Working with Legacy Code
Working With Legacy Code
An Introduction to Unit Testing
Mixing testing types to improve your testing results
An Overview of automated testing (1)
Quality assurance in the early stages of the product
Ad

Similar to TDD - Designing with Expectations, not Implementations (20)

PDF
TDD and Simple Design Workshop - Session 1 - March 2019
PPTX
TDD - Seriously, try it - Codemotion (May '24)
ODP
Effective TDD - Less is more
PDF
Tdd practices
PPTX
TDD - Seriously, try it! - Opensouthcode
PPTX
Test Driven Development on Android (Kotlin Kenya)
PPTX
Test-Driven Development.pptx
PDF
TDD, the way to better software | Dan Ursu | CodeWay 2015
PPTX
TDD - Seriously, try it! (updated '22)
PPTX
TDD - Seriously, try it! - Bucarest Tech Week
PPTX
TDD in Agile
PDF
Test driven development : software process
PDF
Test Driven Development (TDD)
PPTX
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
PPTX
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
PDF
Test Driven Development Methodology and Philosophy
PPTX
Test-Driven Development In Action
PPTX
Test Driven Development - a gentle introduction
PPT
Test Driven Development - Overview and Adoption
PPTX
Test driven development v1.0
TDD and Simple Design Workshop - Session 1 - March 2019
TDD - Seriously, try it - Codemotion (May '24)
Effective TDD - Less is more
Tdd practices
TDD - Seriously, try it! - Opensouthcode
Test Driven Development on Android (Kotlin Kenya)
Test-Driven Development.pptx
TDD, the way to better software | Dan Ursu | CodeWay 2015
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! - Bucarest Tech Week
TDD in Agile
Test driven development : software process
Test Driven Development (TDD)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
Test Driven Development Methodology and Philosophy
Test-Driven Development In Action
Test Driven Development - a gentle introduction
Test Driven Development - Overview and Adoption
Test driven development v1.0
Ad

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Digital Strategies for Manufacturing Companies
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
history of c programming in notes for students .pptx
PDF
top salesforce developer skills in 2025.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
AI in Product Development-omnex systems
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administration Chapter 2
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Digital Strategies for Manufacturing Companies
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Adobe Illustrator 28.6 Crack My Vision of Vector Design
history of c programming in notes for students .pptx
top salesforce developer skills in 2025.pdf
L1 - Introduction to python Backend.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
AI in Product Development-omnex systems
Odoo Companies in India – Driving Business Transformation.pdf
CHAPTER 2 - PM Management and IT Context
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
System and Network Administration Chapter 2

TDD - Designing with Expectations, not Implementations