bytedance / Fastbot_Android

Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Other
1.05k stars 241 forks source link

fastbot 黑名单无效 #3

Closed zhugehui9527 closed 3 years ago

zhugehui9527 commented 3 years ago

黑名单:

[ { "activity":"a1.b1.c1.bussiness.usercenter.activity.SettingFunctionActivity", "xpath": "//android.widget.TextView[@text='退出登录']" } ]

日志: [1607323166075] Get guitree [1607323166076] `<?xml version="1.0" encoding="UTF-8"?>

`

[1607323166077] using nstep-q agent [1607323166078] // Display Bounds: (0,0),(1080,2340) [1607323166078] // Black Element : //android.widget.TextView[@text='退出登录'], Index : 0 [1607323166079] // No matching nodes [1607323166080] select new action from ucb q value: null [1607323166081] Try to select the max value action. [1607323166081] select new action from e-greedy [1607323166082] new state visited : 10 [1607323166082] new action visited : 2 [1607323166082] get new reward [1607323166082] alpha is : 0.6 default is : 0.2 moving alpha is 0.6 [1607323166082] state is saturated, get reward -0.09380863039399624 [1607323166083] update Q value [1607323166083] // previous State and action polled [1607323166083] // update change value [1607323166083] get n step new reward [1607323166083] 0step reward is 1.1 [1607323166084] 1step reward is 0.6183443085606775 [1607323166084] 2step reward is 1.2042089702148129 [1607323166084] 3step reward is 1.8186089702148132 [1607323166084] 4step reward is 1.7801849552054323 [1607323166085] // got reward : 1.7801849552054323 [1607323166085] // got qvalue : 9.842592000000002 [1607323166085] Qt=6.28896, Reward=1.7801849552054323, Qt+1=9.842592000000002, Qt'=8.30813913312326 [1607323166085] Making decisions [1607323166085] New state: g0s1@a1.b1.c1.bussiness.usercenter.activity.SettingFunctionActivity@-1474695563 [1607323166086] New action: g0a26@CLICKWidget{hashCode=804737430, index=5, clazz='android.widget.TextView', resourceId='a1.b1.c1.client.stg:id/setting_function_log_out_tv', operationTypeMask=6, scrollType=none, text='退出登录', contentDesc=''}[priority=4][throttle=0][][saturation=(1.0,1)][bounds=(41,981,1039,1132)] [1607323166086] Inject event [1607323166087] :Sending Touch (ACTION_DOWN): 0:(540.0,1056.5) [1607323166093] :Sending Touch (ACTION_UP): 0:(540.0,1056.5) [1607323166097] Sleep for 0 ms [1607323166098] Sleep for 100 ms [1607323166201] Sleep for 0 ms [1607323166222] Exception for get action resouece: g0a33@CLICKWidget{hashCode=-2136732855, index=2, clazz='android.widget.Button', resourceId='a1.b1.c1.client.stg:id/btn_right', operationTypeMask=6, scrollType=none, text='确定', contentDesc=''}[priority=4][throttle=500][][saturation=(1.0,1)][bounds=(540,1178,911,1332)] [1607323166223] Exception for get action class: g0a33@CLICKWidget{hashCode=-2136732855, index=2, clazz='android.widget.Button', resourceId='a1.b1.c1.client.stg:id/btn_right', operationTypeMask=6, scrollType=none, text='确定', contentDesc=''}[priority=4][throttle=500][][saturation=(1.0,1)][bounds=(540,1178,911,1332)] [1607323166224] Exception for get action resouece: g0a34@CLICKWidget{hashCode=730653600, index=1, clazz='android.widget.Button', resourceId='a1.b1.c1.client.stg:id/btn_left', operationTypeMask=6, scrollType=none, text='取消', contentDesc=''}[priority=24][throttle=0][][saturation=(1.0,1)][bounds=(168,1178,539,1332)] [1607323166224] Exception for get action class: g0a34@CLICKWidget{hashCode=730653600, index=1, clazz='android.widget.Button', resourceId='a1.b1.c1.client.stg:id/btn_left', operationTypeMask=6, scrollType=none, text='取消', contentDesc=''}[priority=24][throttle=0][][saturation=(1.0,1)][bounds=(168,1178,539,1332)] [1607323166225] Exception for get action resouece: g0a35@BACKg0s3@a1.b1.c1.bussiness.usercenter.activity.SettingFunctionActivity@1526358486[priority=6][throttle=200][, UNVISITED] [1607323166225] Exception for get action class: g0a35@BACKg0s3@a1.b1.c1.bussiness.usercenter.activity.SettingFunctionActivity@1526358486[priority=6][throttle=200][, UNVISITED] [1607323166226] Get guitree [1607323166227] <?xml version="1.0" encoding="UTF-8"?>

zhangzhao4444 commented 3 years ago

xpath 配置格式不对,"xpath":"//*[@text=‘xxx’]"