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

Types of Coding with Automated Tests

Types of Coding with Automated Tests

In these slides, I compare different styles of coding styles with automated tests written.

Lemi Orhan Ergin

November 16, 2018
Tweet

More Decks by Lemi Orhan Ergin

Other Decks in Technology

Transcript

  1. CODE Refactoring is skipped to be faster Increased duplication in

    code Long methods We have to clean our mess TEST FAIL TEST PASS Tested Mess Based Development TEST START
  2. Refactoring is skipped to be faster Increased duplication in code

    Long methods We have to clean our mess TEST FAIL TEST PASS Test First Then Write Everything Based Development TEST START CODE CODE CODE CODECODECOD ODE
  3. CODE TEST FAIL TEST PASS TEST FAIL Failed test guaranteed

    Can mask ignorance of domain Dummy-Test First Development TEST update same TEST REFACTOR START
  4. CODE START TEST REFACTOR TEST PASS No failing tests Useful

    for exploring Losing focus on design Mock misuse Too much refactoring required Code First Development
  5. CODE START TEST REFACTOR TEST PASS Uncovered bugs Hard to

    write tests Bored programmers Lower test quality Test Last Development CODE CODE CODECODECODE CODE
  6. CODE TEST REFACTOR TEST PASS START TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TEST FAIL TEST Allows planning for future code Loss of focus Harder to code against Test Everything First Development
  7. CODE TEST REFACTOR TEST PASS START TEST FAIL Large, bri!le

    setup methods Slow tests High level tests People hate testing Huge Setup Based Development SETUP
  8. CODE SCENARIO REFACTOR Acceptance Test Driven Development TEST PASS START

    TEST TEST FAIL SCENARIO FAIL SCENARIO PASS Increased focus Focus on requirements Do also the right thing