![Page 3: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/3.jpg)
[email protected] ©2017
![Page 4: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/4.jpg)
[email protected] ©2017
- Review
- What does good TDD look like?
- Something about Mocks
- Why does TDD work?
- It’s all about feedback
![Page 6: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/6.jpg)
[email protected] ©2017
![Page 7: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/7.jpg)
[email protected] ©2017
- Write new code only if an automated test has failed
- Eliminate duplication
![Page 8: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/8.jpg)
[email protected] ©2017
Test-Driven Development isIncremental Specification
Bill Caputo
http://logosity.net/notes.html#2017.09
![Page 10: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/10.jpg)
[email protected] ©2017
public class ExchangeRateUploaderTest extends EasyMockTestCase { private Logger logger; private CurrencyManager mockCurrencyManager; private ExchangeRateManager mockExchangeRateManager; private PriceManagerFactory mockPriceManagerFactory; private PriceManager mockPriceManager; private GodObject mockGod; private DatabaseFacade mockPersistenceManager; private DatabaseFacade mockFrameworkPersistenceManager; private CyclicProcessManager mockCyclicProcessManager; private SystemVariableManager mockSystemVariableManager; private ScreenManager mockScreenManager; private Registry registry; private User adminUser; private Server server;
private ExchangeRateUploader newExchangeRateUploader(CyclicProcessThread thread) { return new ExchangeRateUploader(thread) { @Override protected void initializeAction() throws FrameworkException { // Does nothing to prevent excessive mocking } @Override public Logger getLogger() { return logger; } @Override protected void setLogMDC() { } @Override protected User getUser() { return adminUser; } @Override protected CurrencyManager newCurrencyManager() { return mockCurrencyManager; } @Override protected PriceManagerFactory newPriceManagerFactory() { return mockPriceManagerFactory; } @Override protected CyclicProcessManager newCyclicProcessManager() { return mockCyclicProcessManager; } @Override protected DatabaseFacade newPersistenceManager() { return mockPersistenceManager; } @Override protected Registry newTaskPerformanceRegistry() { return registry; } @Override public PriceDataManager getPriceDataManager() { return null; } @Override protected ExchangeRateManager newExchangeRateManager() { return mockExchangeRateManager; } };
}
private CyclicProcessThread mockUserStateAndGetCyclicProcessThread() { Role mockAdminRole = addMock(Role.class); CyclicProcessThread thread = addMock(CyclicProcessThread.class); expect(thread.getAdminRole()).andReturn(mockAdminRole).anyTimes(); expect(thread.getAdminUser()).andReturn(adminUser).anyTimes(); thread.interrupt(); expectLastCall(); mockScreenManager = addMock(ScreenManager.class); expect(mockGod.getScreenManager()).andReturn(mockScreenManager).anyTimes(); mockScreenManager.setThreadSignedOnState(new SignedOnState(adminUser, mockAdminRole, false)); expectLastCall().anyTimes(); expect(thread.getGod()).andReturn(mockGod).anyTimes(); expect(thread.getShutdownInProgress()).andReturn(false).anyTimes(); return thread; }
private void mockContextPersistenceManager() { mockFrameworkPersistenceManager = addMock(DatabaseFacade.class); expect(mockGod.getDatabaseFacade()).andReturn(mockFrameworkPersistenceManager).anyTimes(); mockFrameworkPersistenceManager.beginNewSession(); expectLastCall().anyTimes(); }
private void mockPriceManager() throws PriceException { mockPriceManagerFactory = addMock(PriceManagerFactory.class); mockPriceManager = addMock(PriceManager.class); expect(mockPriceManagerFactory.newPriceManager(mockFrameworkPersistenceManager, mockSystemVariableManager, null)) .andReturn(mockPriceManager).once(); }
public void testInternalAction() throws FrameworkException { mockGod = addMock(GodObject.class); expect(mockGod.getPriceDataManager()).andStubReturn(null); mockPersistenceManager = addMock(DatabaseFacade.class); registry = addMock(Registry.class); adminUser = new TestUser("Admin", "", "", new TestCompany("company"), ""); mockCyclicProcessManager();
registry.finalizeThisThread(isA(String.class), isA(String.class)); Date now = DateUtils.trimMinutesAndSecondsFromDate(new Date());
mockSystemVariableManager(); mockLogger(); mockContextPersistenceManager(); mockPriceManager();
CyclicProcessThread thread = mockUserStateAndGetCyclicProcessThread();
String primeName = "prime"; String aName = "a"; String otherName = "other";
Currency primeCurrency = new TestCurrency(primeName, true); Currency aCurrency = new TestCurrency(aName, true); Currency otherCurrency = new TestCurrency(otherName, false);
FXCurrencyPair aCurrencyPair = new FXCurrencyPair(primeCurrency, aCurrency); FXCurrencyPair otherCurrencyPair = new FXCurrencyPair(otherCurrency, primeCurrency);
setupCurrencyManager(primeCurrency, aCurrency, otherCurrency); mockExchangeRateManager = addMock(ExchangeRateManager.class);
mockGetFXRatesAtDatesForCurrencies(now, aCurrencyPair, otherCurrencyPair);
FrameworkNumber aCurrencyValue = new FrameworkNumber("5"); FrameworkNumber otherCurrencyValue = new FrameworkNumber("2"); ExchangeRate aCurrencyRate = new ExchangeRate(primeCurrency, aCurrency, aCurrencyValue, now); ExchangeRate otherCurrencyRate = new ExchangeRate(otherCurrency, primeCurrency, otherCurrencyValue, now); expect(mockCurrencyManager.getParentToFractionalCurrencyMapForFractionalCurrency()).andStubReturn(newMap());
expect( mockExchangeRateManager.saveExchangeRate(null, new FrameworkString(primeName), new FrameworkString(aName), aCurrencyValue, new FrameworkDate(now))).andReturn(null); expect( mockExchangeRateManager.saveExchangeRate(null, new FrameworkString(otherName), new FrameworkString(primeName), otherCurrencyValue, new FrameworkDate(now))).andReturn(null);
Map<String, ExchangeRate> out = new HashMap<String, ExchangeRate>(); out.put("primea", aCurrencyRate); out.put("otherprime", otherCurrencyRate); expect(mockPriceManager.getLatestExchangeRates(newList(aCurrencyPair, otherCurrencyPair))).andReturn(out);
mockPMFactoryCleanup();
replayMocks();
ExchangeRateUploader uploader = newExchangeRateUploader(thread); uploader.initialise(); uploader.run(); }
private void mockSystemVariableManager() { mockSystemVariableManager = addMock(SystemVariableManager.class); expect(mockGod.getSystemVariableManager()).andReturn(mockSystemVariableManager).anyTimes(); expect(mockSystemVariableManager.getSystemVariable(CYCLIC_PROCESS_LISTENER_HEART_BEAT_TOLERANCE, "30000")) .andReturn("30000").anyTimes(); }
private void mockLogger() { logger = addMock(Logger.class); logger.info(isA(String.class)); expectLastCall().atLeastOnce(); logger.debug(isA(String.class)); expectLastCall().atLeastOnce(); } Mocking Test
![Page 17: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/17.jpg)
[email protected] ©2017
https://jmtest.com/wp-content/uploads/2017/04/Onsite-Calibration-1024x576.jpg
How do we do TDD well?
![Page 18: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/18.jpg)
[email protected] ©2017
- When you'’re lost, slow down
- Test at the right level
- Tests explain the domain
![Page 20: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/20.jpg)
[email protected] ©2017
![Page 22: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/22.jpg)
[email protected] ©2017
![Page 23: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/23.jpg)
[email protected] ©2017
![Page 25: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/25.jpg)
[email protected] ©2017
![Page 26: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/26.jpg)
[email protected] ©2017
![Page 27: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/27.jpg)
[email protected] ©2017
![Page 28: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/28.jpg)
[email protected] ©2017
![Page 30: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/30.jpg)
[email protected] ©2017
BasketTest.add_adding_item() sut = new Basket() sut.add(ITEM) assertEquals( ITEM, backdoor(sut, “itemList”)[0])
![Page 31: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/31.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
![Page 32: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/32.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
Interfaces, not internals
![Page 33: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/33.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
![Page 34: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/34.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
Protocols, not interfaces
![Page 35: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/35.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
![Page 36: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/36.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
From simple to complicated
![Page 37: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/37.jpg)
[email protected] ©2017
is_empty_when_created() assertThat( new Basket().itemCount(), equals(0) )
returns_items_in_the_order_they_were_added() basket = new Basket() .add(pen).add(ink).add(paper) assertThat( basket, hasItems(pen, ink, paper) )
totals_up_the_cost_of_its_items()fails_when_removing_an_absent_item() ...
![Page 38: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/38.jpg)
[email protected] ©2017
“It’s about explaining the domain, not about proving the
correctness of the code.”Andrew Parker
![Page 39: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/39.jpg)
[email protected] ©2017
![Page 41: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/41.jpg)
[email protected] ©2017
![Page 42: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/42.jpg)
[email protected] ©2017
![Page 43: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/43.jpg)
[email protected] ©2017
![Page 44: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/44.jpg)
[email protected] ©2017
![Page 45: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/45.jpg)
[email protected] ©2017
![Page 47: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/47.jpg)
[email protected] ©2017
![Page 48: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/48.jpg)
[email protected] ©2017
![Page 49: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/49.jpg)
[email protected] ©2017
![Page 50: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/50.jpg)
[email protected] ©2017
![Page 51: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/51.jpg)
[email protected] ©2017
![Page 52: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/52.jpg)
[email protected] ©2017
![Page 53: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/53.jpg)
But what about Chicago vs. London
schools?
https://www.flickr.com/photos/nationalmediamuseum/3589381656/
![Page 54: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/54.jpg)
[email protected] ©2017
- Mock objects for understanding relationships between objects
- Integration tests for third party services
- Introduce a Port to isolate dependencies
![Page 55: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/55.jpg)
[email protected] ©2017
![Page 56: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/56.jpg)
[email protected] ©2017
http://history-computer.com/ModernComputer/Basis/images/Tauschek_patent.jpg
Why does TDD work?
![Page 59: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/59.jpg)
[email protected] ©2017
“What’s motivated me to keep practicing TDD for nearly twenty years is
attaining the peace of mind that what I’m creating solves the problem
I set out to solve - and nothing else.”Bill Caputo
http://logosity.net/notes.html#2017.09
![Page 61: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/61.jpg)
[email protected] ©2017
it said the way to program is to look at the input tape and manually type in the output tape you expect. then you program until the actual and expected tapes match.
![Page 62: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/62.jpg)
[email protected] ©2017
i thought, what a stupid idea. i want tests that pass, not tests that fail. why would i write a test when i was sure it would fail. well, i'm in the habit of trying stupid things out just to see what happens, so i tried it and it worked great.
![Page 63: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/63.jpg)
[email protected] ©2017
i was finally able to separate logical from physical design. i'd always been told to do that but no one ever explained how.
![Page 64: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/64.jpg)
[email protected] ©2017
![Page 66: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/66.jpg)
[email protected] ©2017(cc) flickr users zoenet, 22850192@N03, dalbera, free-stock, jonhurd, mccaffry, waytru, zigazou76
![Page 67: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/67.jpg)
[email protected] ©2017
![Page 70: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/70.jpg)
[email protected] ©2017
![Page 71: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/71.jpg)
[email protected] ©2017
![Page 76: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/76.jpg)
[email protected] ©2017
Feedback speed matters
- Make the IDE sing
- Be wary of the debugger
- Invest in faster tests
![Page 77: Test-Driven Development - YOW! Conferences · 2019-09-23 · Test-Driven Development (that’s not what we meant) Steve Freeman steve.freeman@higherorderlogic.com @sf105](https://reader033.vdocument.in/reader033/viewer/2022052723/5f0ee06c7e708231d4415f6d/html5/thumbnails/77.jpg)
[email protected] ©2017
Test-Driven Development isIncremental Specification
Bill Caputo
http://logosity.net/notes.html#2017.09