-
Build Variants and Link Seams
2016-12-18
This post is just another installment in a series of posts that are a written version of my Florida dev fest talk. Last time, we talked about object seams and how they make our apps more testable. This time, we’ll talk about how link seams help you write more testable apps and how build variants are used to create link seams. What are link seams? “[code] contains calls to code in other files.…
-
Object Seams and MVP for Testability
2016-12-09
In my last post, a continuation of a written version of the talk I gave at Florida dev fest, I tried to give an answer to the question, “What makes apps testable?” The answer: seams. Seams make apps testable, and in this post, I want to talk about a particular kind of seam: object seams. The key insight behind object seams in this: The fundamental thing to recognize is that when we look at a call in an object-oriented program, it does not define which method will actually be executed.…
-
What makes Android Apps Testable?
2016-12-03
This post is a continuation of my attempt to reproduce my recent DevFest talk in written form. …
-
Why we Should Probably Write More Tests for Our Android Apps
2016-11-07
This past weekend, I had the privilege of speaking about writing testable Android apps at Florida DevFest. This post is a written version of one of the major points I made in my presentation. Let’s start off with two descriptions of attitudes towards testing. The first comes from Kaushik Goupal (he’s describing an attitude, not endorsing it): Testing seems to be like going to gym. Everyone feels like “yeah. I should be testing.…
-
Unit Testable RecyclerViews
2016-08-08
When building our Android apps, we can often wind up with a decent amount of code in our RecyclerView.Adapters that we want to test. In this article, I briefly suggest two ways of structuring our RecyclerView-related classes so that we can accomplish this. …
-
RxLoader: Lightweight, Boilerplate-Free Data loading with Loaders and RxJava
2016-07-23
Loaders are awesome…they’re essentially the best practice implementation of asynchronous data loading in your Activities. -Reto Meier, Developing Android Apps Udacity Course …
-
An Espresso Test Recorder Deep Dive
2016-07-07
I’ve been working on a unit test recorder for Android. After struggling to find a way to implement the unit test recorder,1 I decided to take a look at how Google implements the espresso test recorder. This post presents what I found when I dug into the source code of the espresso test recorder. Collecting User Interaction Info Before I took a look at the source for the espresso recorder, I half expected to find some fancy bytecode manipulation of the sort we see for the proguard or jacoco transformers.…
-
How to Safely move Logic out of Activities
2016-06-16
In my last post, I argued that we should stop putting our app logic in Activitys and Fragments because it makes both unit testing and functional testing our apps more difficult. In this post, I’ll try to suggest a method of safely removing app logic from our Activitys and Fragments, drawing on a central idea discussed in Michael Feathers’ Working Effectively with Legacy Code: characterization tests. In the first section, I briefly introduce the idea of characterization tests.…
-
Why we Should Stop Putting Logic in Activities
2016-06-14
A while back, I wrote a series of articles about why unit testing Android apps is so difficult and what we can do to make our apps more unit testable. The upshot of the those articles is that dependency injection makes it easier to unit test our Android apps and we can’t get proper dependency injection just by using Dagger (or any other DI framework for that matter) to inject dependencies into our Activitys (or Fragments).…
-
A New way of Learning (Android Development)
2016-06-11
I’m working on a new way of learning android development. I call it “University Android.” The first lesson is available now. Check it out.