Monkey批处理“系统找不到指定的路径。”

要求:
1.Monkey单模块测试;
2.Monkey日志保存到手机根目录;
3.批处理上述要求。
错误写法:
adb shell monkey -p com.android.calendar -p com.android.soundrecorder –throttle 500 –ignore-crashes –ignore-timeouts –ignore-security-exceptions –ignore-native-crashes –monitor-native-crashes -v -v -v 180000 > /storage/sdcard0/test.txt
pause
标红处为Monkey单模块测试命令,是一个整体,而cmd编译器为顺序编译,到蓝色部分就会一个字符一个字符编译,故而出现”系统找不到指定路径“
正确写法:
adb shell ”monkey -p com.android.calendar -p com.android.soundrecorder –throttle 500 –ignore-crashes –ignore-timeouts –ignore-security-exceptions –ignore-native-crashes –monitor-native-crashes -v -v -v 180000 > /storage/sdcard0/test.txt
将划线部分用双引号括起来,编译时,此命令将是一个整体,相当于:
C:\Users\XA-XA-00553>adb shell
shell@ACE:/ $ monkey -p com.android.calendar -p com.android.soundrecorder –throttle 500 –ignore-crashes –ignore-timeouts –ignore-security-exceptions –ignore-native-crashes –monitor-native-crashes -v -v -v 180000 > /storage/sdcard0/test.txt
       

留言

本站文章如未特殊注明,均为原创,转载请注明出处: 未必平凡  本文链接地址: https://vv2014.com/790.html