Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to dump android UI component actions and its data to help to solve the hard-to-reproducible bugs

Is there any way to record user actions in android. Like if someone clicks a button or enters a text, or scrolls a list, how to identify those actions and record the data from the UI component ?

Let me give more background of my intention. Sometimes during my manual testing, there are some so called hard to reproducible bugs. Sometimes it's hard for me to remember what I have done before the bug happens especially after a quite long time. So one of my idea is to record what I have done before the bug appears. I'd like to use a light way, not recording the screens, so maybe we can simply dump user actions and the corresponding UI controls' data which can give us some clues to reminder me what i have done and what data has been outputted to save the circumstances. Is there any better way to solve the hard-to-reproducible bugs?

like image 328
bettermanlu Avatar asked May 23 '13 01:05

bettermanlu


2 Answers

Yep, adb supports it natively since API 16 (Android JellyBean 4.1) with UI-Automator.

adb shell uiautomator events

Bam, that's it. Tells you the views clicked and their text/description from the perspective of the Accessibility framework.

like image 69
Tim O'Brien Avatar answered Oct 20 '22 22:10

Tim O'Brien


Testdroid tool has Recorder that allows recording user actions and generating UI automation tests. http://testdroid.com/product/testdroid-recorder#0

like image 20
Y2i Avatar answered Oct 20 '22 23:10

Y2i