Ideas for Android Monkey Automation

I am currently using the Android Monkey tool for stress testing Android system / packages. I find this useful. But so far, everything has been manual testing (i.e. open emulator, execute monkey-shell adb <...>, etc.). I would like to β€œautomate” , and it is launched externally by the build server.

My initial instinct is to simply write a shell script to execute the monkey (using random seeds), and then save the results in a build server file. But is it really helpful?

It's just interesting if someone has done this before and / or has a β€œsmarter” idea for automating Android Monkey. A Google search using the terms "automation of android monkeys" turned out to be little relevant information.

All thoughts are welcome.

+7
android testing automated-tests
source share
2 answers

Update:

I decided to go with a simple shell script, since I could not come up with anything smarter. This is still ongoing. Here it is in its current state:

#!/bin/bash REPORTROOT=./reports # remove old report files echo "Removing old output report files..." rm $REPORTROOT # make dir for new report files echo "Output reports will be stored in $REPORTROOT..." mkdir $REPORTROOT # run monkey on the entire system echo "Running Monkey on entire system..." adb -e shell monkey -v -v -v 500 > $REPORTROOT/monkey_sys.txt # pull the log file from device? # run monkey on particular packages # packages here... # create composite report echo "Running reports..." grep -A 5 -h -r CRASH $REPORTROOT > $REPORTROOT/crash_report.txt 

The output is a simple .txt file with several lines of any failures.

+10
source share

You can look at Hudson - it should be possible to run the emulator and then execute the android monkey command.

+7
source share

All Articles