Grabbing screenshots with Spoon
A typical Android application consists of several activities with many components and various flows of user interaction. Instrumentation tests should be able to cover if not all, most of the activity flows; so, hundreds of instrumentation tests might run every time the corresponding Maven goal is invoked. It is also very common during the development cycles that some tests might get broken due to some recent changes or new Android SDKs or new incompatible devices. Maven can report on the errors found during a test run, but in some cases the information provided is not enough. A picture worth a thousand words, so wouldn't be much better if we could have a report of all screenshots taken during integration test execution?
Spoon (http://square.github.io/spoon/) comes to the rescue and allows us to do two things that are not offered through the Android testing framework. First while running the tests we can grab screenshots and second, after finishing the...