69
FAKE IT OUTSIDE-IN TDD David Völkel 05.10.2017 @ XP Days Germany

Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

FAKE IT OUTSIDE-IN TDDDavid Völkel 05.10.2017 @ XP Days Germany

Page 2: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

@DAVIDVOELKEL@codecentric

@softwerkskammer

#TDD

Page 3: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INFLUENCES 2003 Kent Beck’s "Fake It" Pattern 2009 #GOOS’s "Outside-In" Design 2013 Emily Bache

"Outside-In development with Double Loop TDD" 2014 Justin Searls "The Failures of 'Intro to TDD'"

COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In Fake It Session 2017 Refinement

Page 4: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INFLUENCES 2003 Kent Beck’s "Fake It" Pattern 2009 #GOOS’s "Outside-In" Design 2013 Emily Bache

"Outside-In development with Double Loop TDD" 2014 Justin Searls "The Failures of 'Intro to TDD'"

COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In Fake It Session 2017 Refinement

Page 5: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INFLUENCES 2003 Kent Beck’s "Fake It" Pattern 2009 #GOOS’s "Outside-In" Design

COMBINATION FAKE IT OUTSIDE-IN TDD

Page 6: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

FAKE IT OUTSIDE-IN TDD

INFLUENCES 2003 Kent Beck’s "Fake It" Pattern 2009 #GOOS’s "Outside-In" Design 2013 Emily Bache

"Outside-In development with Double Loop TDD" 2014 Justin Searls "The Failures of 'Intro to TDD'" 2017 Llewelyn Falco „Extreme: Fake it Till you Make It“

FAKE IT OUTSIDE-IN TDD

Page 7: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

WHY? Outside-In => YAGNI free design

Page 8: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

WHY? Outside-In => YAGNI free design

Avoid mocking drawbacks - Readability - Refactorability

Page 9: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

AGENDA Theory

Building Blocks Fake It Outside-In

Questions

Page 10: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

AGENDA Theory

Building Blocks Fake It Outside-In

Questions

OPEN SPACE Practice

Mob Programming Session Reflect

Retro Trade-Offs

Page 11: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

BUILDING BLOCKS

Page 13: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INTEGRATION OPERATION SEGREGATION PRINCIPLE

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

Account account = customer.account(); String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; String content = "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service";

mailService.sendMail(email, content); }

Page 14: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OPERATION

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

Account account = customer.account(); String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; String content = "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service";

mailService.sendMail(email, content); }

INTEGRATION OPERATION SEGREGATION PRINCIPLE

Page 15: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INTEGRATION

INTEGRATION

OPERATION

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

Account account = customer.account(); String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; String content = "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service";

mailService.sendMail(email, content); }

INTEGRATION OPERATION SEGREGATION PRINCIPLE

Page 16: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INTEGRATION

INTEGRATION

OPERATION

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

Account account = customer.account(); String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; String content = "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service";

mailService.sendMail(email, content); }

INTEGRATION OPERATION SEGREGATION PRINCIPLE

Page 17: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OPERATION

INTEGRATIONpublic void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

String content = renderMessage(customer, customer.account());

mailService.sendMail(email, content); }

private String renderMessage(Customer customer, Account account) { String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; return "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service"; }

INTEGRATION OPERATION SEGREGATION PRINCIPLE

Page 18: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

String content = renderMessage(customer, customer.account());

mailService.sendMail(email, content); }

private String renderMessage(Customer customer, Account account) { String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; return "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service"; }

TESTS?

Page 19: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OPERATION

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

String content = renderMessage(customer, customer.account());

mailService.sendMail(email, content); }

private String renderMessage(Customer customer, Account account) { String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; return "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service"; }

TESTS?

N UNITTESTS

Page 20: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

INTEGRATION

OPERATION

public void sendDiscountMailingTo(String email) { Customer customer = customerDB.findCustomerBy(email);

String content = renderMessage(customer, customer.account());

mailService.sendMail(email, content); }

private String renderMessage(Customer customer, Account account) { String discount = account == FREE ? "no" : account == BASE ? "a 10%" : account == PREMIUM ? "a 25%" : "-ERROR-"; return "Hello " + customer.getName() + ",\n\n" + "This week you get " + discount + " discount " + "on all our products.\n\n" + "Best Regards,\n" + "ACME Customer Service"; }

TESTS?1 INTEGRATION TEST

N UNITTESTS

Page 21: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

GREEN BAR PATTERNS*

Obvious Implementation

Fake it (until you make it)

Triangulation

* Kent Beck in "TDD by Example"

Page 22: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

GREEN BAR PATTERNS

Obvious Implementation

Fake it

Triangulation

Trade-Off

Complexity

Page 24: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

SWEET SPOT

Trivial

GREEN BAR PATTERNS

Obvious Implementation

Fake it

Triangulation

Page 25: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

SWEET SPOT

Trivial

Structure

GREEN BAR PATTERNS

Obvious Implementation

Fake it

Triangulation

Page 26: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

SWEET SPOT

Trivial

Structure

Logic

GREEN BAR PATTERNS

Obvious Implementation

Fake it

Triangulation

Page 27: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

PREPARATORY REFACTORINGS*

*"An example of preparatory refactoring", Martin Fowler

Page 28: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

PREPARATORY REFACTORINGS*

*"An example of preparatory refactoring", Martin Fowler

Page 29: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

"GREEN" PHASE TRIANGULATION

Implementation Run Test

"Green Phase"

Page 30: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

LIMIT YOUR TIME IN RED

"Green Phase"

Implementation Run Test

Page 31: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

LIMIT YOUR TIME IN RED

"Green Phase"

Implementation Run Test

Implementation Run TestPreparatory Refactoring

Page 33: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Acceptance Test

UI

Persistence

OUTSIDE-IN

Page 34: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Acceptance Test

UI

Persistence

OUTSIDE-IN & MOCKS

Page 35: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Unit test Mock

OUTSIDE-IN & MOCKS

Page 36: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Unit Test

OUTSIDE-IN & MOCKS

Page 37: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Acceptance Test

UI

Persistence

OUTSIDE-IN & MOCKS

Page 38: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Non trivial

Acceptance Test

OUTSIDE-IN & FAKE IT

Page 39: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Comprehensive

Acceptance Test

Faked Result

OUTSIDE-IN & FAKE IT

Page 40: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Acceptance Test

Fake

Fake

OUTSIDE-IN & FAKE IT

Page 41: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

Acceptance Test Drive Structure

through Refactoring

OUTSIDE-IN & FAKE IT

Page 42: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT

Acceptance Test

Unit Test

Fill logic with

triangulation

Page 43: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT

Acceptance Test Unit Test

Page 44: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT INTEGRATION

Fake It

TriangulationOPERATION

Start with

• comprehensive Acceptance Test

• faked result

Drive structure by refactoring

Drive logic by unit tests

Page 45: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT INTEGRATION

Fake It

TriangulationOPERATION

Start with

• comprehensive Acceptance Test

• faked result

Drive structure by refactoring

Drive logic by unit tests

Page 46: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

DIAMOND KATA

Page 49: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

WHY? Outside-In

=> YAGNI free design Without mocking drawbacks

Page 50: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

WHY? Outside-In

=> YAGNI free design Without mocking drawbacks

Vs Triangulation More time in GREEN Better Design Guidance

Page 51: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

DISCUSSION

Page 53: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

IMAGES Most are Public Domain except theses

Creative Commons with attributions:

"Unstruttalbrücke" by Störfix

From State Library of Queensland

Page 54: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

FAKE IT OUTSIDE-IN TDD MOB PROGRAMMING SESSION

Page 55: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

AGENDA 05 min. Intro & Kata 40 min. Mob Programming 15 min. Retro & Tradeoffs

Page 56: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT INTEGRATION

Fake It

TriangulationOPERATION

Start with

• comprehensive Acceptance Test

• faked result

Drive structure by refactoring

Drive logic by unit tests

Page 57: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

OUTSIDE-IN & FAKE IT INTEGRATION

Fake It

TriangulationOPERATION

Start with

• comprehensive Acceptance Test

• faked result

Drive structure by refactoring

Drive logic by unit tests

Page 58: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

DIAMOND KATA

Page 59: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

KATA Continue Diamond Kata

https://github.com/davidvoelkel/diamond-kata

CODING SESSION

Page 60: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

RETROSPECTIVE Observations?

Page 61: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

RETROSPECTIVE Observations?

Strenghts / Weaknesses?

Page 62: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

TRADE-OFFS FAKE IT VS

OUTSIDE-IN & MOCKS TRIANGULATION

Page 63: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

CONDITIONAL INTERACTIONS

Mocking when IOSP not possible

public String signup(String username) throws Exception { if(userDB.findUserBy(username) == null) { userDB.createUser(new User(username)); return "Welcome " + username; } else { return "Username ' " + username + "' " + "already taken, please choose another"; } }

Page 64: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

COUPLING OUTSIDE-IN

Mocking Fake It

Decoupling Refactorability

Page 65: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

DATA GUIDES STRUCTURE

Triangulation Fake It

Structure Cumbersome Data guides well

Page 66: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

# BRANCHES

Triangulation Fake It

# N 1

More confidence More effort

Page 67: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

# BRANCHES

Triangulation Fake It

# N 1

Fake data easy to forget

Omitting cases is tempting

Page 68: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

TIME IN GREEN

Triangulation

Prep Refactoring Triangulation

Fake It

Page 69: Fake It Outside-In TDD XP Days I… · 2014 Justin Searls "The Failures of 'Intro to TDD'" COMBINATION 2015 Dimitry Polivaev Outside-In with faked Data 2016 SoCraTes DE Outside-In

DISCUSSION