Simple play icon Course
Skills Expanded

Droidcon Boston '19: Writing Tests That Stand the Test of Time

by Droidcon Boston

You will leave the talk having a clearer understanding of why tests are important and worth the time and ultimately be able to apply the tips to write robust and more maintainable tests.

What you'll learn

One of the promises of test-driven development is the confidence and ease with which we can refactor our production code. However, sometimes we find ourselves in situations where our tests are too coupled to our code and we have to change the tests every time we update the code. At this point, we start wondering if the tests are worth it. If you have ever found yourself having to update your tests every time the behavior of a dependency of a class changes, then this talk is for you. This talk is to share some patterns, tools, and examples that can guide us to write more maintainable tests. We will look at why we need tests in the first place, how writing tests is an investment that will save time in the future. We will also look at some causes of unmaintainable tests (for example using a wrong test double, testing implementation details and not general behavior) and how to overcome these problems. With the use of examples from everyday Android development, we will learn how to avoid brittle tests. You will leave the talk having a clearer understanding of why tests are important and worth the time and ultimately be able to apply the tips to write robust and more maintainable tests.

Table of contents

Writing Tests That Stand the Test of Time
43mins

About the author

Droidcon Boston brings the best of Android to Boston since 2017. This conference is part of the vision of Double Espresso (www.2xe.io) that aims to keep training affordable to everyone and to give equal opportunities to speak to speakers from all over the world. Droidcon Boston is where Android experts from around the world come together to look into the future of Android, mobile development and ethics to prepare for the challenges and opportunities ahead. Droidcon Boston is where the Android co... more

Ready to upskill? Get started