Pressure test scripts for Capture or Burst Shot

In android, we can use adb shell input command to simulate the user tap operation for the pressure test.

For example, I use the shell scripts to test the single capture or burst shot. As the following code snapshot:

testcapture.sh

#!/system/bin/sh
echo "start"
declare -i i=0;
while ((i<9999999))
do
# 555.0 1804.0 is the position of the shutter button 
# simulate the single tap event.
    adb shell input tap 555.0 1804.0;
    let i++;
done
echo "done"


testburstshot.sh

#!/system/bin/sh
echo "start"
declare -i i=0;
while ((i<9999999))
do
# 555.0 1804.0 is the position of the shutter button.
# 8000 is the delay time, unit is ms.
# simulate the long press event.
    adb shell input touchscreen swipe 555.0 1804.0 555.0 1804.0 8000;
    let i++;
done
echo "done"

你可能感兴趣的:(Pressure test scripts for Capture or Burst Shot)