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

I Walk In The Shadow Of Valley Of Tests

I Walk In The Shadow Of Valley Of Tests

Most if not all people in the software development world are telling you that you should write tests for your code. The amount of articles, blog posts, books, and white papers is overwhelming, you start reading them, you feel you are ready, and then you take a look at your code. Chances are you will get disheartened, by the sheer amount of it, by how it might seem hard, by terminology and approaches, by flavors of testing, by the investment of time required, by plain "OMG, I need to touch that code piece, things might break", or by tight deadlines of small projects. We will be looking at ways to start introducing the tests into your code base, to try and cross the uncanny valley of tests, which claimed lives of many code hours.

Vranac Srdjan

November 22, 2014

More Decks by Vranac Srdjan

Other Decks in Programming


  1. business owner, developer, consultant, mercenary, writing terrible code that performs

    exceptionally, wrangling elePHPants and Pythons, obsessed with process automation, interested in continuous integration and delivery, clean code, testing, best practices and distributed systems Code4Hire, 2014, PHP T-Day 2
  2. Testing Calisthenics First learn stand, then learn fly. Nature rule,

    Daniel-san, not mine. — Miyagi Code4Hire, 2014, PHP T-Day 12
  3. Mocks Vs Stubs • Dummy • Fake • Stub •

    Mock Code4Hire, 2014, PHP T-Day 18
  4. Mocks Vs Stubs • Dummy • Fake • Stub •

    Mock Code4Hire, 2014, PHP T-Day 19
  5. Mocks Vs Stubs Mock objects are used to define expectations

    Mocks record and verify such expectations. Stubs do not record or verify expectations, but rather allow us to “replace” the behavior, state of the “fake”object in order to utilize a test scenario Code4Hire, 2014, PHP T-Day 21
  6. Web Testing • Goutte • Mink • Zombie.js • CasperJS

    • Codeception • Selenium Code4Hire, 2014, PHP T-Day 25
  7. Continuous Integration • Jenkins • Bamboo • Travis • TeamCity

    • Semaphore Code4Hire, 2014, PHP T-Day 29
  8. Final Level Code with no tests, is worse than code

    with bad tests, is worse than code with some tests, is worse than code with all the tests Code4Hire, 2014, PHP T-Day 33
  9. Final Level Hunting for the 100% code coverage most of

    the times is impractical, but getting it to more than 0% is attainable goal. Code4Hire, 2014, PHP T-Day 34
  10. Final Level You are always a student, never a master.

    You have to keep moving forward. — Conrad Hall Code4Hire, 2014, PHP T-Day 35