我想知道是否有一种方法可以禁用每次测试失败时appium都会执行的错误报告功能,因为这可能会非常耗时,而且我发现自己只是在等待报告生成时甚至没有需要它
appium日志中的样本:
2018-07-20 15:29:31:770 - [HTTP]
{"type":"bugreport","sessionId":"337b3e20-17d1-4b9d-a564-4107fbd6cd52"}
2018-07-20 15:29:31:770 - [debug] [W3C] Calling AppiumDriver.getLog() with args: ["bugreport","337b3e20-17d1-4b9d-a564-4107fbd6cd52"]
2018-07-20 15:29:31:771 - [debug] [BaseDriver] Retrieving 'bugreport' logs
2018-07-20 15:29:31:771 - [debug] [BaseDriver] Retrieving supported log types
2018-07-20 15:29:31:771 - [debug] [ADB] Running '/usr/local/share/android-sdk/platform-tools/adb -P 5037 -s 04db2741df5621fc bugreport'
在多个设备版本上签入Android Developer工具时,我没有找到关闭此功能的选项,这里有一个“ Take bug report”选项,这似乎并不是我想要的。预先感谢您的帮助。
答案 0 :(得分:0)
我发现自己遇到了与您相同的问题,并通过将adb包装到一个代理脚本中解决了该问题,该脚本删除了任何错误报告请求。这不是最终的解决方案,但它可以工作并节省大量时间。
只需转到您的Android SDK,将adb重命名为adb-real,然后创建一个名为adb的脚本并确保设置执行权限。这是Bash脚本,如果您碰巧正在使用Windows,则可能要创建其他类型的脚本。
#!/bin/bash
if [[ "$*" =~ .*bugreport.* ]]
then
echo "Ignoring bugreport"
else
adb-real $*
fi