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

Tackling developers in the heart of testing world

Tackling developers in the heart of testing world

Write tests should be a practice that we need to do every time when we are developing software, the talk was an introduction to start in the testing world.

Erik Jhordan Rey

April 01, 2017
Tweet

More Decks by Erik Jhordan Rey

Other Decks in Programming

Transcript

  1. Tackling developers in the heart of testing world Erik Jhordan

    González Reyes Mobile Engineer at Segundamano [email protected] @ErikJhordan_Rey github.com/erikcaffrey
  2. / SCHIBSTED MEDIA GROUP Erik Jhordan Rey “Mobile Engineer believer

    on software architecture, design patterns, clean code, solid and testing.” Mobile Engineer at Segundamano
  3. / SCHIBSTED MEDIA GROUP Presence in 30 Countries Y seguimos

    creciendo MÉXICO Colombia Chile Brasil República Dominicana LATINOAMÉRICA Noruega Suecia Finlandia Bélgica Francia ESCANDINAVIA / EUROPA Portugal Alemania Polonia España Italia Irlanda Suiza Austria Hungría Rumania Bielorrusia Reino Unido Marruecos ÁFRÍCA Túnez Malasia Indonesia Singapur Vietnam Tailandia Bangladés ASIA / OCEANÍA
  4. Mobile Team ➔ Carmen Salvador ➔ Diego Ramirez ➔ Ivan

    Alvarez Frias ➔ Juan Pablo Villa ➔ Quentin Désert ➔ Arturo Gutierrez ➔ Jose Luis Cadena ➔ Ranferi Dominguez
  5. Technical Debt ➔ Does team have the same level? ➔

    Is it easy to onboard new people? ➔ Is the code consistent? ➔ Is hard to maintain? ➔ Can we add a new functionality fast? ➔ Can we get kpi’s on easy way? ➔ Can measure and monitoring the app? ➔ Is our code base preparate to scale? ➔ Is our code preparate to write test?
  6. / SCHIBSTED MEDIA GROUP ➔ Passes all tests ➔ Reveal

    al idea ➔ No Duplication ➔ Minimized classes and methods Simple design
  7. / SCHIBSTED MEDIA GROUP View Presenter ViewController Use Case Use

    Case Use Case Domain Model Data Source Implementation Repository Repository Data Source Data Source Data Source Implementation Presentation Layer Domain Layer Data Layer Navigator
  8. / SCHIBSTED MEDIA GROUP Testing Testing is the process of

    executing a program with the intent of finding errors… Glenford J Myers
  9. / SCHIBSTED MEDIA GROUP Dummy objects are passed around but

    never actually used. Usually they are just used to fill parameter lists.
  10. / SCHIBSTED MEDIA GROUP Stubs Provide canned answers to calls

    made during the test, usually not responding at all to anything outside what's programmed in for the test.
  11. / SCHIBSTED MEDIA GROUP Spies Are stubs that also record

    some information based on how they were called. One form of this might be an email service that records how many messages it was sent.
  12. / SCHIBSTED MEDIA GROUP Mock Are pre-programmed with expectations which

    form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting.
  13. / SCHIBSTED MEDIA GROUP Fake Objects actually have working implementations,

    but usually take some shortcut which makes them not suitable for production (an InMemoryTestDatabase is a good example).
  14. / SCHIBSTED MEDIA GROUP O’Reilly Free Programming The main goal

    is to practice good practices, architecture and testing. https://github.com/erikcaffrey/oreilly-books-android
  15. • Depend on abstractions do not depend on concrete class

    • Use design patterns on smart way • Maintain a clean code style • Write Clean and Solid Code • Favor composition over inheritance • If your code is coupled the Refactor is your friend • Write test is your responsibility • Understand the tools before used it • Automatize Advices