Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mastering BDD for iOS

Mastering BDD for iOS

Slides from Day 2 of Mastering BDD Course.

Paul Stringer

May 25, 2016
Tweet

More Decks by Paul Stringer

Other Decks in Technology

Transcript

  1. DONEC QUIS NUNC CLEAN ARCHITECTURE • Independent of Frameworks •

    Independent of UI • Independent of Database • Independent of Everything • Testable
  2. COMPONENTS CLEAN ARCHITECTURE • ENTITIES
 Enterprise Business Rules • INTERACTORS


    Application Business Rules • INTERFACE ADAPTORS
 Convert Data • FRAMEWORKS
 Implementation Details
  3. ONLY THE ‘C’ OF YOUR VIEW, NOT YOUR BUSINESS UIVIEWCONTROLLER

    • viewDidLoad: • viewWillAppear: • viewDidAppear: • viewWillDisappear: • viewDidDisappear: • viewWillLayoutSubviews: • viewDidLayoutSubviews:
  4. UIVIEWCONTROLLER VIEW <INTERACTOR INPUT> INTERACTOR PRESENTER <VIEW MODEL> <INTERACTOR OUTPUT>

    <ENTITY GATEWAY> BUSINESS LOGIC UI ADAPTORS FRAMEWORKS COREDATA ENTITIES NSURLSESSION
  5. FIXTURES ACCEPTANCE TESTS <INTERACTOR INPUT> INTERACTOR PRESENTER <VIEW MODEL> <INTERACTOR

    OUTPUT> <ENTITY GATEWAY> BUSINESS LOGIC ADAPTORS FRAMEWORKS TEST DATA ENTITIES UI
  6. WKINTERFACECONTROLLER WKINTERFACEOBJECT <INTERACTOR INPUT> INTERACTOR PRESENTER <VIEW MODEL> <INTERACTOR OUTPUT>

    <ENTITY GATEWAY> BUSINESS LOGIC ADAPTORS FRAMEWORKS TEST DATA ENTITIES UI
  7. THE LONGER IT TAKES TO READ AND UNDERSTAND A TEST

    THE MORE TIME IS WASTED AND LESS TIME FOR PRODUCTIVE WORK
  8. UNDERSTANDABILITY OF CONTEXT AND FOCUS SHORTCUT FOR TESTS PERCEIVED PRESSURE

    TIME FOR PRODUCTIVE WORK AMOUNT OF WASTED TIME TIME TO UNDERSTAND INTENT Negative Effect Management Effect Positive Effect VALUE OF INTENT REVEALING TESTS
  9. — COSY HOME, PRODUCT OWNER. COSY HOME HAS THREE TEMPERATURE

    SETTINGS SLUMBER, COMFY, COSY. IN THAT ORDER EACH SETTING MUST BE GREATER THAN THE LAST, BUT NOT GREATER THAN 30 DEGREES. ” “
  10. ” “ — Fred Brooks, The Mythical Man Month. “SHOW

    ME YOUR FLOWCHARTS AND CONCEAL YOUR TABLES, AND I SHALL CONTINUE TO BE MYSTIFIED. SHOW ME YOUR TABLES, AND I WON’T USUALLY NEED YOUR FLOWCHARTS; THEY’LL BE OBVIOUS.”
  11. EMILY BACHE, CODING-IS-LIKE-COOKING.INFO DOUBLE LOOP TDD WRITE A FAILING ACCEPTANCE

    TESTS WRITE A FAILING UNIT TEST MAKE THE TEST PASS REFACTOR Minutes Days
  12. DOesN’t scAle (sLow, fRagIle, cOmpLex) TOo HarD eXerCisE tHe BusIneSs

    LogIc TErrIblE dEfeCt LocAliSatIon ABanDonEd, reVerT tO mAnuAl TesTing