I currently use the Android Monkey tool for stress testing Android system/packages. I find it to be useful. But so far everything has been manual testing (i.e. open emulator, execute adb shell monkey <...>, etc.). I'd like to "automate" this and have it triggered externally by a build server.
My initial instinct is to just write a shell script to execute monkey (using random seeds) and then store the results in an build server accessible file. But is this really useful?
Just curious if anyone has done this before and/or has a "smarter" idea for automating Android Monkey runs. A Google search using terms "automating android monkey" turned up little relevant information.
All thoughts welcome.
Update:
I decided to go with a simple shell script since I couldn't think of anything "smarter" to do. It's still a work in progress. Here it is at it's 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 a few lines about any crashes.
You could look at Hudson - that should be able to start an emulator and then do your android monkey commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With