UI Automation Framework for Games and Apps
8.3k
stars
1.31k
forks
source link
代码执行过程中停止了,添加了异常捕获,没有捕获到任何错误也不报错,最后一个日志输出是[13:58:21][DEBUG]<airtest.utils.nbsp> [airtouch_server]b'Start local socket (maxpresent_14426) server...' #1181
Open
yuanyahui opened 11 months ago
发现一个有趣的问题,我写了5段定位代码,执行到最后一个定位时代码就停止运行了,当我加了一段定位代码后,重新运行,之前的第段代码竟然执行了,但是第6段不执行,基本就是代码执行到最后一个总会自动停止,这会是中间服务断开了原因吗? 完整的日志 /usr/local/bin/python3.9 /Users/yuanyahui/git/automation_namibox/namibox/w_demo/Airtest/Android/AndroidCommon.py [13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 get-state
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 wait-for-device
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell getprop ro.build.version.sdk
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys activity top
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys package com.netease.open.pocoservice
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 forward --no-rebind tcp:11946 tcp:10080
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 forward --no-rebind tcp:17971 tcp:10081
[13:58:02][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell ps -A |echo $(grep -E com.github.uiautomator)
[13:58:13][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell am force-stop com.netease.open.pocoservice
[13:58:13][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell am start -n com.netease.open.pocoservice/.TestActivity
[13:58:13][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell am instrument -w -e debug false -e class com.netease.open.pocoservice.InstrumentedTestAsLauncher com.netease.open.pocoservice/androidx.test.runner.AndroidJUnitRunner
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb devices
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb devices
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 get-state
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 wait-for-device
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell getprop ro.build.version.sdk
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb devices
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb devices
当前连接设备id:172.16.81.65:48887
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell input keyevent KEYCODE_WAKEUP
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys window policy
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys window policy
[13:58:15][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell monkey -p com.jinxin.namibox -c android.intent.category.LAUNCHER 1
1600 2560
[13:58:16][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell am start -n com.jinxin.namibox/com.jinxin.app.ui.activity.DeepLinkActivity -d "http:///appnative/redirect_page?app_action={"command":"app_action","name":"openbook","bookid":"tape3a_000002"}"
[13:58:18][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell ls -l /data/local/tmp/rotationwatcher.jar
[13:58:19][DEBUG] install_rotationwatcher skipped
[13:58:19][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell app_process -Djava.class.path=/data/local/tmp/rotationwatcher.jar /data/local/tmp com.example.rotationwatcher.Main
[13:58:19][DEBUG] [rotation_server]b'0'
[13:58:20][INFO] update orientation None->0
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell wm size
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell getprop ro.sf.lcd_density
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys SurfaceFlinger
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys input
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell dumpsys window displays
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell getevent -p
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell ls -l /data/local/tmp/maxpresent.jar
[13:58:20][DEBUG] install_maxtouch skipped
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 forward --no-rebind tcp:14426 localabstract:maxpresent_14426
[13:58:20][DEBUG] /opt/homebrew/Caskroom/android-platform-tools/31.0.3,e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c/platform-tools/adb -s 172.16.81.65:48887 shell app_process -Djava.class.path=/data/local/tmp/maxpresent.jar /data/local/tmp com.netease.maxpresent.MaxPresent socket maxpresent_14426
[13:58:21][DEBUG] [airtouch_server]b'Metrics Message : 2560.0=====1600.0'
[13:58:21][DEBUG] [airtouch_server]b'Start local socket (maxpresent_14426) server...'