(given at Droidcon Italy 2018 and Android Makers 2018)
You open a pull request only to find that some tests are now failing. What goes through your mind?
Did I break something? Do I need to update the tests? Just what is that test testing anyway?
Ideally, #2 would almost never be the case, as rewriting a test usually means it's lost the regression testing value of its original form. How can we get there though? There’s no one right way to write tests, and it’s surprisingly easy to fall into the trap of writing change tests. There are good patterns you can leverage to scale them and maximize their long term value. This talk will detail simple patterns you can follow for healthy, pragmatic testing with a focus on test design, correctness, and how these values can translate into better overall API design of your code.