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

Effective TDD on Android @ MADG

Effective TDD on Android @ MADG

Live coding performed at Idealista.com office (Madrid, Spain), showing how to approach Test-Driven-Development on Android with Kotlin programming language, in front of a Full house.

https://www.idealista.com/labs/blog/idealista/idealista-kaizen-show-effective-android-tdd-with-kotlin/

Olmo Gallegos

November 07, 2017
Tweet

More Decks by Olmo Gallegos

Other Decks in Programming

Transcript

  1. Overview - Basis of the workshop • Custom approach to

    TDD • Testable code • Android architecture, MVP + Passive View • Kotlin coroutines #MADGtestsWithK
  2. API requests to http://chucknorris.io • Get random joke • Get

    joke by category • Get categories #MADGtestsWithK
  3. API requests to http://chucknorris.io • Get random joke • Get

    joke by category • Get categories • Search jokes by keyword #MADGtestsWithK
  4. Example Request: Random joke by category { "category": [ "dev"

    ], "icon_url": "https://assets.chucknorris.host/img/avatar/chuck-norris.png", "id": "4rfk-ymnth28ny8q2pbrow", "url": "http://api.chucknorris.io/jokes/4rfk-ymnth28ny8q2pbrow", "value": "Chuck Norris went out of an infinite loop." } JSON #MADGtestsWithK
  5. Credits Bandhook Kotlin - https://github.com/antoniolg/Bandhook-Kotlin OpenLibraryApp - https://github.com/jrgonzalezg/OpenLibraryApp kotlinx.coroutines -

    https://kotlinlang.org/docs/reference/coroutines.html kategory.io - http://kategory.io Passive View - https://martinfowler.com/eaaDev/PassiveScreen.html #MADGtestsWithK
  6. Conclusions • TDD is not the real challenge; having testable

    code is • Tests need to be maintained, as requirements do • The real win is to reproduce bugs directly in your tests • Less executions more productivity #MADGtestsWithK