bytedance / Fastbot_iOS

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

stub模式端口监听问题 #86

Open wslyyy opened 2 years ago

wslyyy commented 2 years ago

部分Xcode日志 :

9797:

dataPort = 9797; launchenv = "stubPort=9797"; ), NSLocalizedDescription=无法连接服务器。, NSErrorFailingURLStringKey=http://127.0.0.1:9797/, NSErrorFailingURLKey=http://127.0.0.1:9797/, _kCFStreamErrorDomainKey=1} rrorFailingURLStringKey=http://127.0.0.1:9797/, NSErrorFailingURLKey=http://127.0.0.1:9797/, _kCFStreamErrorDomainKey=1} 2022-05-20 15:34:17.062966+0800 FastbotRunner-Runner[4460:292405] try touch dataport: 9797: ), NSLocalizedDescription=无法连接服务器。, NSErrorFailingURLStringKey=http://127.0.0.1:9797/, NSErrorFailingURLKey=http://127.0.0.1:9797/, _kCFStreamErrorDomainKey=1} ), NSLocalizedDescription=无法连接服务器。, NSErrorFailingURLStringKey=http://127.0.0.1:9797/, NSErrorFailingURLKey=http://127.0.0.1:9797/, _kCFStreamErrorDomainKey=1} +0800 FastbotRunner-Runner[4460:292405] get version dataport: 9797: "SHOOTS_PORT" = 9797; stubPort = 9797; 2022-05-20 15:34:43.407151+0800 FastbotRunner-Runner[4460:292405] get version dataport: 9797:

socket:

2022-05-20 15:34:17.055445+0800 FastbotRunner-Runner[4460:292550] [connection] nw_socket_handle_socket_event [C1:2] Socket SO_ERROR [61: Connection refused] 2022-05-20 15:34:19.078606+0800 FastbotRunner-Runner[4460:292551] [connection] nw_socket_handle_socket_event [C2:2] Socket SO_ERROR [61: Connection refused] 2022-05-20 15:34:43.403593+0800 FastbotRunner-Runner[4460:292551] [connection] nw_socket_get_input_frames [C4:2] recvmsg(fd 16, 1024 bytes) [54: Connection reset by peer] 2022-05-20 15:34:43.404475+0800 FastbotRunner-Runner[4460:292551] [connection] nw_socket_output_finished [C4:2] shutdown(16, SHUT_WR) [57: Socket is not connected] 2022-05-20 15:36:16.663536+0800 FastbotRunner-Runner[4460:292797] [connection] nw_socket_get_input_frames [C69:2] recvmsg(fd 18, 1024 bytes) [54: Connection reset by peer] 2022-05-20 15:36:16.663979+0800 FastbotRunner-Runner[4460:292797] [connection] nw_socket_output_finished [C69:2] shutdown(18, SHUT_WR) [57: Socket is not connected]

wslyyy commented 2 years ago

stub已注入被测app,能获取到view [fastbot] : visit ToDo.ItemListViewController,UIApplicationRotationFollowingController,UIApplicationRotationFollowingControllerNoTouches,UIEditingOverlayViewController,UIInputWindowController,UINavigationController; visited ViewController count is: 2 [fastbot] : state visited: 207 [fastbot] : action visited: 18 [fastbot] : state is saturated, get reward -34.425837 [fastbot] : got reward: -42.3464 [fastbot] : build state cost: 0.000s action cost: 0.000s total cost 0.000s

wslyyy commented 2 years ago

但testFastbot里取消注释那段系统弹窗处理断点进不去,没有运行

wslyyy commented 2 years ago

@geron-cn

hulaogou commented 2 years ago

stub已注入被测app,能获取到view [fastbot] : visit ToDo.ItemListViewController,UIApplicationRotationFollowingController,UIApplicationRotationFollowingControllerNoTouches,UIEditingOverlayViewController,UIInputWindowController,UINavigationController; visited ViewController count is: 2 [fastbot] : state visited: 207 [fastbot] : action visited: 18 [fastbot] : state is saturated, get reward -34.425837 [fastbot] : got reward: -42.3464 [fastbot] : build state cost: 0.000s action cost: 0.000s total cost 0.000s

老哥,请问一下是怎么注入被测app的

wslyyy commented 2 years ago

stub已注入被测app,能获取到view [fastbot] : visit ToDo.ItemListViewController,UIApplicationRotationFollowingController,UIApplicationRotationFollowingControllerNoTouches,UIEditingOverlayViewController,UIInputWindowController,UINavigationController; visited ViewController count is: 2 [fastbot] : state visited: 207 [fastbot] : action visited: 18 [fastbot] : state is saturated, get reward -34.425837 [fastbot] : got reward: -42.3464 [fastbot] : build state cost: 0.000s action cost: 0.000s total cost 0.000s

老哥,请问一下是怎么注入被测app的

通过pbxproj工具向Xcode项目中添加fasbot-stub.framework动态库,并重新编译

hulaogou commented 2 years ago

stub已注入被测app,能获取到view [fastbot] : visit ToDo.ItemListViewController,UIApplicationRotationFollowingController,UIApplicationRotationFollowingControllerNoTouches,UIEditingOverlayViewController,UIInputWindowController,UINavigationController; visited ViewController count is: 2 [fastbot] : state visited: 207 [fastbot] : action visited: 18 [fastbot] : state is saturated, get reward -34.425837 [fastbot] : got reward: -42.3464 [fastbot] : build state cost: 0.000s action cost: 0.000s total cost 0.000s

老哥,请问一下是怎么注入被测app的

通过pbxproj工具向Xcode项目中添加fasbot-stub.framework动态库,并重新编译

这个项目下好像没有fasbot-stub.framework动态库文件啊