Using monkey, the stability and robustness can be measured accordingly, the results of the test are very important for the implementation of the product in the complex environment.
Here is a demo sample with the corresponding gaze. Simple and clear. For everyone to participate in the test.
#!/bin/bash# Define case Base Informationcase_name= "Monkey case" case_ver= "1.0.2" Case_package_name= " Cn.packagename.platform "Case_event_scale=5000echo"-------------------------------------"echo" Job Name:${case_ Name}, Ver:${case_ver} "echo"-------------------------------------"# start Jobecho" List all connected device and Checking them ... "current_date= ' Date" +%y-%m-%d%h:%m:%s "' adb devices > Devices.listif grep-q ' Device ' Devices.listthen echo "The package ready for send pseudo random event" echo "case starting ..." adb shell Monke Y-p ${case_package_name}-v ${case_event_scale}--pct-motion,--pct-syskeys--monitor-native-crashes current_ Date= ' Date ' +%y-%m-%d%h:%m:%s "' current_msg= ' finished! ' else current_date= ' date ' +%y-%m-%d%h:%m:%s "' current_msg=" warnning!!! No devices connected! " echo "[${current_date}]${current_msg}" > error.logfi# finishedecho "[${current_date}]${current_msg}" echo "Quiting ..."
Android self-motivated test based on monkey