How i run monkey test with exclude some packages?
monkey --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions --throttle 200 -v 20000000
I want to test all activities of all packages in my device, but i do not want to test “com.android.camera”.
Use monkey balcklist option --pkg-blacklist-file:
1, make a new file called blacklist.txt, contains the package name which you don't want to test,each a line.
2, push this file into device, like /sdcard/blacklist.txt
3, run monkey use balcklist option:
monkey --pkg-blacklist-file /sdcard/blacklist.txt --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions --throttle 200 -v 20000000
来源:https://stackoverflow.com/questions/30069068/android-monkey-test-exclude-some-packages