Fastbot-iOS(iOS monkey)schema参数的指定方式
之前介绍过iOS monkey 的安装和使用方式,上周跑了一次,发现了4个crash,挺好用。
这回更新一下schema参数的指定方式,
1、排除的元素(不需要点击的元素)格式:excluded_elements "退出登录": "解绑设备": "移除分享设备": "q": "w": "e": "r": "t"
2、事件数量:FASTBOT_EVENT_COUNT 6000000
3、控件点击的最大深度:FASTBOT_MAX_DEPTH 4
下面是Fastbot-iOS的运行日志:
2024-12-19 20:22:00.861513+0800 FastbotRunner-Runner[36971:2106833] fastbot version: 20210520.3 test env: {
BUNDLEID = "com.1234567890.ios";
"CA_ASSERT_MAIN_THREAD_TRANSACTIONS" = 0;
"CA_DEBUG_TRANSACTIONS" = 0;
"CFFIXED_USER_HOME" = "/private/var/mobile/Containers/Data/Application/E1154B47-A2BD-4748-B22E-6D883A99DCFC";
"FASTBOT_EVENT_COUNT" = 6000000;
"FASTBOT_MAX_DEPTH" = 4;
HOME = "/private/var/mobile/Containers/Data/Application/E1154B47-A2BD-4748-B22E-6D883A99DCFC";
"LLVM_PROFILE_FILE" = "/dev/null";
LOGNAME = mobile;
NSUnbufferedIO = YES;
"OS_ACTIVITY_DT_MODE" = YES;
PATH = "/usr/bin:/bin:/usr/sbin:/sbin";
PWD = "/tmp";
"RUN_DESTINATION_DEVICE_ECID" = 2951781243527214;
"RUN_DESTINATION_DEVICE_NAME" = iPhonexxx;
"RUN_DESTINATION_DEVICE_PLATFORM_IDENTIFIER" = "com.apple.platform.iphoneos";
"RUN_DESTINATION_DEVICE_UDID" = f89d929e8c45a81c0fe2d22f80c1a36e227e90ef;
SHELL = "/bin/sh";
"SQLITE_ENABLE_THREAD_ASSERTIONS" = 1;
"SWIFTUI_VIEW_DEBUG" = 287;
TMPDIR = "/private/var/mobile/Containers/Data/Application/E1154B47-A2BD-4748-B22E-6D883A99DCFC/tmp/";
USER = mobile;
XCTestBundlePath = "PlugIns/FastbotRunner.xctest";
XCTestConfigurationFilePath = "";
XCTestSessionIdentifier = "332E7C5F-A715-4999-B1ED-E10388300877";
"XPC_FLAGS" = 0x0;
"XPC_SERVICE_NAME" = "UIKitApplication:glazero.FastbotRunner.xctrunner[035b][rb-legacy]";
"__CF_USER_TEXT_ENCODING" = "0x1F5:0:0";
"__XPC_LLVM_PROFILE_FILE" = "/dev/null";
duration = 800;
"excluded_elements" = "\"\U9000\U51fa\U767b\U5f55\": \"\U89e3\U7ed1\U8bbe\U5907\": \"\U79fb\U9664\U5206\U4eab\U8bbe\U5907\": \"q\": \"w\": \"e\": \"r\": \"t\"";
"log_level" = verbose;
"output_directory" = "/Users/testmanzhang/Fastbot_iOS-main/12191.txt";
"random_seed" = 12191;
rotation = portrait;
throttle = 200;
}
我这里指定事件数量是6000000次,不是说会点击这么多次,duration和事件数量哪个条件先满足就停止执行了,就是说时间到达800分钟后就不再继续执行了。通过日志可以看到,执行800分钟,总共点击的次数是46336次。