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

TDD, CI & CD

TDD, CI & CD

Talk about Test Driven Development, Continuous Integration and Continuous Delivery made at the WebMentors 2018 (webMentors2018.cat)

Avatar for Esteve Aguilera

Esteve Aguilera

March 20, 2018

Other Decks in Programming

Transcript

  1. Hi, my name is Esteve and I do stuff! Co-founder

    & CBO at Fewlaps [email protected] esteveaguilera.github.io github.com/EsteveAguilera @EsteveAguilera
  2. Els que fem apps i coses Més de 3 milions

    de descàrregues a tot el mon Més de 200.000 usuàris actius al mes Android, iOS i WindowsPhone Disponible en 18 idiomes
  3. Based on a talk by Roc Boronat Co-founder at Fewlaps

    https://youtu.be/f8Qaqbxu0J0 github.com/rocboronat @rocboronat
  4. Test Driven Development Add a TEST Run the TEST Pass?

    Make some changes YES NO Party hard REFACTOR!
  5. Testing and Refactoring Legacy Code You can not change production

    code if not covered by tests Just automated refactoring (via IDEs) are allowed
  6. Testing and Refactoring Legacy Code Start testing from shortest to

    deepest branch Start refactoring from deepest to shortest branch
  7. Some tips about unit tests follow the given-when-then style test

    one thing at a time test the domain: is easy and valuable know the tools: JUnit + AssertJ + Mockito
  8. Integration tests develop the API module by TDD check that

    your customer’s API has not changed monitor your own API using a CI tool
  9. Instrumentation tests simple way to do defensive testing fast way

    to develop “deep screens” espresso has been a game changer barista serves a great espresso (https://github.com/SchibstedSpain/Barista) they use to fail at CI tools
  10. Tests bonus track do EDD (Error-Driven Development) Found a bug?

    Write a test that reproduces it before fixing it!
  11. Continuous delivery Develop Master Feature Feature Release v 0.1 v

    0.2 launch releases from GIT using Gitflow