jayway/maven-android-plugin — pull request #193 by stephanenicolas (2013-03-30 06:29:36+00:00)
Title: Add support to automatically take screenshots in case of test failure / error for UIAutomator.

This pull requests adds 2 new properties to UI Automator goal :

* takeScreenshotOnFailure that decides whether or not to take a screenshot of device when test fails.
* screenshotsPathOnDevice that allow users to change destination folder of screenshots on device.

A typical configuration is to run ui automator tests and, afterwards to get the screenshots pulled back to the build folder.

Screenshots are taken using the utility screencap that is available on devices with SDK 16+ (the same as ui automator). It's a super fast utility to take screenshots and this works pretty well.

Pull requests also contains documentation update and tests.

Generally speaking, devs can take additional screenshots during tests as usual using either celebrity (that is built-in maven android plugin) or the new screenshot API of UiDevice offered by UiAutomatorTestCase.

@Manfred, would you like me to update the sample for ui automator tests ?

Could you deploy the plugin (again), all my tests of ui automator mysteriously fail on travis and I would like to get more information about failures using this screenshot feature.