## Introduction
Fastbot is a model-based testing tool for modeling GUI transitions to discover app stability problems. It combines machine learning and reinforcement learning techniques to assist discovery in a more intelligent way.
> Related: [Fastbot_Android](https://github.com/bytedance/Fastbot_Android)
***More detail see at [Fastbot architecture](https://mp.weixin.qq.com/s/QhzqBFZygkIS6C69__smyQ)
**update 2022.1**
* update Fastbot Revised License
* release AnyTrace, the Fastbot test management assistant: supports one-click Fastbot test start, crash analysis, etc. ([AnyTrace User Manual](https://www.volcengine.com/docs/6431/82895))
## Prepare test environment
* `cd Fastbot-iOS && pod install --repo-update`
* Open `Fastbot-iOS.xcworkspace`, Set `FastbotRunner` [Signing & Capabilities](./Doc/Fastbot-Xcode-Sign.png) and [Bundle ID](./Doc/Fastbot-Xcode-BundleId.png)
* USB connected the device & trust the device, if you're using a simulator, start up the simulator
* Open FastbotRunner network permission (unnecessary for simulator), a sample on device 00008030-001054A80C82802E:
* - Open [XcodeIDE run `testPingNetwork` in Tests](./Doc/Fastbot-Xcode-IDE.png) or Run command:
```shell
BUNDLEID=com.apple.Pages duration=240 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Release -destination 'platform=iOS,id=00008030-001804563E44802E' -only-testing:FastbotRunner/FastbotRunner/testPingNetwork
```
* - By tapping FastbotRunner on the device, the screen of the device would go black for about one minute. During the black screen interval, users should press the home button on the device to go back to the main screen. Wait patiently until the network setting dialog window pops up. Users should allow the pop up request in order to continue.
* - If "`ping network success`" appears in the console log, that means get network permission **successful**
## Run Test
* Ensure that your application can run on the device. (Installed and trusted)
* Environment Variables should be setted in command line or [Xcode IDE/Scheme/Test](./Doc/Fastbot-Xcode-Scheme.png)
|key|note|sample|
|--|--|--|
| BUNDLEID| Test App's Bundle ID|com.apple.Pages
|duration|Test duration, units of minutes|300
|launchenv|Start arguments for Test APP, can be empty or key-values separated with ":" |isAutoTestUI=1:channel=AutoTest
|throttle|Throttle for operate, units of millisecond|300
* A sample run test on device 00008030-001054A80C82802E. *if IDE scheme Env Vars changed , command Env Var would be void*:
```shell
BUNDLEID=com.apple.Pages duration=240 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Release -destination 'platform=iOS,id=00008030-001804563E44802E' -only-testing:FastbotRunner/FastbotRunner/testFastbot
```
***More detail see at [中文手册](./Doc/handbook-cn.md)***
-----------
## Advanced Extension
Stub mode: Target dynamic library [`fastbot_stub`](./Fastbot-iOS/fastbot-stub/stub.m). Stub mode requires injection of fastbot_stub into the test app. The library captures GUI structure by parsing the app under test for fastbot. More customized features (eg. hook callback, cut View) can be constructed by users for additional abilities such as blocking certain view from being clicked, customized ViewControllers, etc.
*We highly appreciate any contribution from the community !!!*
**Usage**:
After injecting fastbot_stub to app, you need:
* Uncomment code block `[fastbot_native addUIInterruptionMonitor: ...];` in [FastbotRunner.m](./Fastbot-iOS/FastbotRunner/FastbotRunner.m#L57)
* Run the stub mode by editing [Scheme Environment Variables](./Doc/Fastbot-Xcode-Scheme.png)(9797 can be changed to another port number):
|key|sample|
|--|--|
|launchenv|stubPort=9797
|dataport|9797
-----------
## Analytics
To prioritize and improve Fastbot-iOS, FastbotRunner collects usage data and uploads it to Google Analytics. FastbotRunner collects the md5 hash of the test app's Bundle ID, this information allows us to measure the volume of usage. If they wish, users can choose to disable the Analytics by skip step `Open FastbotRunner network permission` or change FastbotRunner's `Wireless Data` to off in System Preference.
-----------
## Support
* Public technical discussion on github is preferred.
* Q&A:
**Q**: Get Error when `pod install --repo-update`<br>
**A**: install pod firstly `sudo gem install cocoapods -v=1.8.1`
<br>
**Q**: Get Error: `Assert Fail Timed out while evaluating UI query`<br>
**A**: Restart test or Replug USB or Change a USB line or Restart iPhone
<br>
**Q**: Get Error when use simulator<br>
**A**: Change to Debug Mode in scheme setting
<br>
**Q**: Get unkown install Error:`com.apple.dt.MobileDeviceErrorDomain` <br>
**A**: Check your signing certificate or Replug USB or Change a USB line or Restart iPhone
<br>
--------
## License
> Copyright©2021 Bytedance
>
> Licensed under [Fastbot Revised](./LICENSE)
Fastbot-iOS required some features are based on or derives from projects below:
* [WebDriverAgent](https://github.com/facebook/WebDriverAgent) licensed under BSD-3-Clause
## Publications
If you use our work in your research, please kindly cite us as:
1. Lv, Zhengwei, Chao Peng, Zhao Zhang, Ting Su, Kai Liu, Ping Yang (2022). “Fastbot2: Reusable Automated Model-based GUI Testing for Android Enhanced by Reinforcement Learning”. In proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering (ASE 2022). ACM, To appear. [[pdf]](https://se-research.bytedance.com/pdf/ASE22.pdf)
```bibtex
@inproceedings{fastbot2,
title={Fastbot2: Reusable Automated Model-based GUI Testing for Android Enhanced by Reinforcement Learning},
author={Lv, Zhengwei and Peng, Chao and Zhang, Zhao and Su, Ting and Liu, Kai and Yang, Ping},
booktitle={Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering (ASE 2022)},
year={2022}
}
```
2. Peng, Chao, Zhao Zhang, Zhengwei Lv, Ping Yang (2022). “MUBot: Learning to Test Large-Scale Commercial Android Apps like a Human”. In proceedings of the 38th International Conference on Software Maintenance and Evolution (ICSME 2022). IEEE, To appear. [[pdf]](https://se-research.bytedance.com/pdf/ICSME22B.pdf)
```bibtex
@inproceedings{mubot,
title={MUBot: Learning to Test Large-Scale Commercial Android Apps like a Human},
author={Peng, Chao and Zhang, Zhao and Lv, Zhengwei and Yang, Ping},
booktitle={Proceedings of the 38th International Conference on Software Maintenance and Evolution (ICSME 2022)},
year={2022}
}
```
3. Cai, Tianqin, Zhao Zhang, and Ping Yang. “Fastbot: A Multi-Agent Model-Based Test Generation System”. In Proceedings of the IEEE/ACM 1st International Conference on Automation of Software Test. 2020. [[pdf]](https://se-research.bytedance.com/pdf/AST20.pdf)
```bibtex
@inproceedings{fastbot,
title={Fastbot: A Multi-Agent Model-Based Test Generation System},
author={Cai, Tianqin and Zhang, Zhao and Yang, Ping},
booktitle={Proceedings of the IEEE/ACM 1st International Conference on Automation of Software Test},
pages={93--96},
year={2020}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
Fastbot-iOS
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共38个文件
png:13个
plist:4个
json:3个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
需积分: 5 0 下载量 186 浏览量
2024-05-30
14:55:25
上传
评论
收藏 9.24MB ZIP 举报
温馨提示
Monkey 测试在 iOS 端的实践; GitHub:https://github.com/bytedance/Fastbot_iOS; 指导:https://testerhome.com/topics/37837;
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![unitypackage](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![dmg](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 38 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/911a0d23a6ce4050996e2cfe9a2e3bd5_qq284489030.jpg!1)
生命的脚步从不停歇
- 粉丝: 490
- 资源: 390
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- g++、make、cmake三种方式来编译ros2的C++节点
- 什么学校气象学能和清华并列第一?通过气象小项目带大家爱上Python(二维温度图)[对应的完整代码和数据集]
- 什么学校气象学能和清华并列第一?通过气象小项目带大家爱上Python(二维温度图)[对应的完整代码和数据集]
- Golang实现的基于时间轮算法的定时器.zip
- 什么学校气象学能和清华并列第一?通过气象小项目带大家爱上Python(二维温度图)[对应的完整代码和数据集]
- 粤嵌gec6818开发板项目的分享、.docx
- 探索OpenAI的AI革命:技术突破与代码实践
- Docker 配置和使用
- unity 场景水的实现
- AG News Classification Dataset
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)