Speaker Spotlight: Andrew Dyer

Andy Dyer is a Lead Android developer at ChaiOne in Houston, Texas.

For fun, he builds apps such as Kollektor to organize his record collection and Wrist Presenter to explore uses for wearables like the Android Wear & Pebble Smartwatch.

When not writing code, he can be found listening to records and proselytizing the merits of craft beer & meticulously prepared coffee.

He is currently learning German and plans to move to Berlin in the near future.




Session TitleAutomated Testing for Modern Android Applications

Session Description: We've all been to conference talks about testing. Most of them start with a general overview of the various types of automated tests and finish with a list of testing tools. I left each of these talks knowing I should be writing tests for my Android apps and feeling guilty for not doing so. After multiple attempts at setting up testing tools first in Eclipse and then in Android Studio, I finally found an approach that works well for me. In this talk, I will share what I have learned with the goal of demystifying the automated testing of Android applications.

Compared to dynamic languages such as Ruby, static languages like Java are not as straightforward to test. Stubbing and mocking in dynamic languages is very easy, but to do the same in Java, we must reconsider our application architecture to better accommodate testing. I'll begin with an introduction to the concept of dependency injection (DI). You'll learn what it is, how it can decouple / modularize your code, and make it easier to test.

With dependency injection as our primary vehicle, next we'll see how to use it to stub and mock components in our tests. By stubbing and mocking the right things, we can write unit tests that prove our code does what we expect.

In addition to unit testing components, we also need to test the actual screens in our apps. In the past this was possible, but required writing almost as much code as the activities or fragments being tested. We had to write boilerplate setup code to work around the complexities of the activity lifecycle and often ended up having tests that were too tightly coupled to the user interface. Luckily, there are now a few tools that simplify the setup of activity and fragment testing. I'll show how to leverage these to write fast-running tests that exercise your app, saving hours upon hours of manual QA testing. Have you ever made a change, launched your app, and tapped through a few screens to test that change? Did it work the first time? Did you get tired of repeating that process? If so, you will be pleased to know that automated UI tests can spare you that struggle.

With a good understanding of how to test our Android apps, we'll finish with a walk through a sample project that demonstrates these concepts in action. I hope that you will leave this talk feeling inspired and excited to test your apps. Save the guilty feelings for the bug reports and crash logs!


Excited for Andy's session? Head on over and grab your ticket TODAY!

Make sure to follow us on Google+Twitter, and Facebook to keep up with all the latest #BABBQ5 news and speaker announcements!