0

Hey android devs ! Just learned MVP architecture and some libs ( Dagger2, rxjava, retrofit) now can anyone explain why do i need 'testing' and how does it benefit and what should i know about it ?

Comments
  • 1
    What Lisanna said and what everyone else is going to say. You need an automated way of going through the functionality of your app. In most languages, that means that you write code to run your code. This makes sure that whenever you change something in the future, you don't break anything you've already tested. This often means that you write more test code than app code.

    And to Lisanna's point, Test Driven Development is an ideology that you write tests to run code you haven't written, then write the minimal amount of code to pass the test. It's pretty difficult to do in practice because we developers like to think about our code as we write it, and it's easy to get carried away. I've been doing TDD at my job for a while now and it really saved our bacon when we had to do a major refactor of our code. We already had tests in place to make sure our app still worked when we deployed. Smoothest refactor ever.
  • 2
    Not testing is like having sex with a bunch of different people without protection. You might not initially get a bug but when you inevitably do, it's going to be nasty and it'll be a bitch to figure out where it came from.
  • 0
    Look up unit and integration testing. For Android JUnit for unit tests and maybe something like Jenkins for integration tests. The one issue you'll run into with Android is mocking our things like the contexts - check out libraries like Mockito for that
Add Comment