Kea2-python 1.1.3b1__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/PKG-INFO +86 -152
  2. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/SOURCES.txt +1 -0
  3. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/requires.txt +1 -0
  4. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/PKG-INFO +86 -152
  5. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/README.md +84 -151
  6. kea2_python-1.2.0/kea2/adbUtils.py +247 -0
  7. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/widget.block.py +0 -2
  8. kea2_python-1.2.0/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  9. kea2_python-1.2.0/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  10. kea2_python-1.2.0/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  11. kea2_python-1.2.0/kea2/assets/monkeyq.jar +0 -0
  12. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/cli.py +3 -3
  13. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fastbotManager.py +10 -26
  14. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fbm_parser.py +19 -24
  15. kea2_python-1.2.0/kea2/fbm_plugin.py +98 -0
  16. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/keaUtils.py +123 -240
  17. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/kea_launcher.py +68 -50
  18. kea2_python-1.2.0/kea2/logWatcher.py +144 -0
  19. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/bug_report_generator.py +16 -8
  20. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/report_merger.py +11 -1
  21. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/templates/bug_report_template.html +160 -70
  22. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/templates/merged_bug_report_template.html +154 -69
  23. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/widget_coverage.py +33 -9
  24. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/result.py +1 -0
  25. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/u2Driver.py +0 -10
  26. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/utils.py +1 -1
  27. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/pyproject.toml +2 -2
  28. kea2_python-1.1.3b1/kea2/adbUtils.py +0 -554
  29. kea2_python-1.1.3b1/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  30. kea2_python-1.1.3b1/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  31. kea2_python-1.1.3b1/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  32. kea2_python-1.1.3b1/kea2/assets/monkeyq.jar +0 -0
  33. kea2_python-1.1.3b1/kea2/logWatcher.py +0 -92
  34. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/dependency_links.txt +0 -0
  35. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/entry_points.txt +0 -0
  36. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/Kea2_python.egg-info/top_level.txt +0 -0
  37. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/LICENSE +0 -0
  38. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/__init__.py +0 -0
  39. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/config_version.json +0 -0
  40. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot-thirdpart.jar +0 -0
  41. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/abl.strings +0 -0
  42. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/awl.strings +0 -0
  43. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.config +0 -0
  44. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
  45. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
  46. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.strings +0 -0
  47. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
  48. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/teardown.py +0 -0
  49. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
  50. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/framework.jar +0 -0
  51. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/kea2-thirdpart.jar +0 -0
  52. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/assets/quicktest.py +0 -0
  53. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fastbotx/ActivityTimes.py +0 -0
  54. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fastbotx/ReuseEntry.py +0 -0
  55. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fastbotx/ReuseModel.py +0 -0
  56. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fastbotx/__init__.py +0 -0
  57. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/fs_lock.py +0 -0
  58. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/kea2_api.py +0 -0
  59. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/mixin.py +0 -0
  60. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/__init__.py +0 -0
  61. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/mixin.py +0 -0
  62. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/report/utils.py +0 -0
  63. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/resultSyncer.py +0 -0
  64. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/state.py +0 -0
  65. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/typedefs.py +0 -0
  66. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/kea2/version_manager.py +0 -0
  67. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/setup.cfg +0 -0
  68. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/tests/test_u2Selector.py +0 -0
  69. {kea2_python-1.1.3b1 → kea2_python-1.2.0}/tests/test_xpath.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 1.1.3b1
3
+ Version: 1.2.0
4
4
  Summary: A python library for supporting and customizing automated UI testing for mobile apps
5
5
  Author-email: Xixian Liang <xixian@stu.ecnu.edu.cn>
6
6
  Requires-Python: >=3.8
@@ -10,6 +10,7 @@ Requires-Dist: rtree>=1.3.0
10
10
  Requires-Dist: jinja2>=3.0.0
11
11
  Requires-Dist: uiautomator2>=3.3.3
12
12
  Requires-Dist: adbutils>=2.9.3
13
+ Requires-Dist: flatbuffers>=25.9.23
13
14
  Requires-Dist: packaging>=25.0
14
15
  Dynamic: license-file
15
16
 
@@ -20,22 +21,10 @@ Dynamic: license-file
20
21
  ![Python](https://img.shields.io/badge/python-3.8%2B-blue)
21
22
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ecnusse/Kea2)
22
23
 
23
- <div>
24
- <img src="https://github.com/user-attachments/assets/8d9f8750-1e10-411b-a49f-7d8367bbe9fe" style="border-radius: 14px; width: 20%; height: 20%;"/>
25
- </div>
26
-
27
-
28
- Please contact Xixian Liang at [xixian@stu.ecnu.edu.cn](xixian@stu.ecnu.edu.cn) with your Wechat ID / QR code to be invited to the WeChat discussion group. Of course, we are also ready on GitHub to answer your questions/feedback.
29
-
30
- #### Github repo [https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
31
- #### Gitee mirror [https://gitee.com/XixianLiang/Kea2](https://gitee.com/XixianLiang/Kea2)
32
-
33
-
34
-
24
+ [<img src="https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white" />](https://github.com/ecnusse/Kea2)
25
+ [<img src="https://img.shields.io/badge/Gitee-Mirror-333333?style=for-the-badge&logo=gitee&logoColor=white" />](https://gitee.com/XixianLiang/Kea2)
35
26
 
36
- ### [点击此处:查看中文文档](README_cn.md)
37
-
38
- ## About
27
+ ### English | [简体中文](/README_cn.md)
39
28
 
40
29
  <div align="center">
41
30
  <img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
@@ -45,11 +34,21 @@ Please contact Xixian Liang at [xixian@stu.ecnu.edu.cn](xixian@stu.ecnu.edu.cn)
45
34
  </div>
46
35
  </br>
47
36
 
37
+ ### [:blue_book: User Manual](/docs/manual_en.md) | [:blue_book: 用户手册](/docs/manual_cn.md)
38
+
39
+ ## About
40
+
48
41
  Kea2 is an easy-to-use tool for fuzzing mobile apps. Its key *novelty* is able to fuse automated UI testing with scripts (usually written by human), thus empowering automated UI testing with human intelligence for effectively finding *crashing bugs* as well as *non-crashing functional (logic) bugs*.
49
42
 
50
- Kea2 is currently built on top of [Fastbot](https://github.com/ecnusse/Fastbot_Android) 3.0 (a modified/enhanced version of the original [FastBot](https://github.com/bytedance/Fastbot_Android) 2.0), *an industrial-strength automated UI testing tool from ByteDance*, and [uiautomator2](https://github.com/openatx/uiautomator2), *an easy-to-use and stable Android automation library*.
43
+ Kea2 is currently built on top of [Fastbot 3.0](https://github.com/ecnusse/Fastbot_Android) (a modified/enhanced version of the original [FastBot 2.0](https://github.com/bytedance/Fastbot_Android)), *an industrial-strength automated UI testing tool from ByteDance*, and [uiautomator2](https://github.com/openatx/uiautomator2), *an easy-to-use and stable Android automation library*.
51
44
  Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
52
45
 
46
+
47
+ https://github.com/user-attachments/assets/6120d8f5-5a9d-4ead-b27e-840c8757e28e
48
+
49
+
50
+
51
+
53
52
  ## Novelty & Important features
54
53
 
55
54
  <div align="center">
@@ -74,11 +73,15 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
74
73
  | **Finding crashes in deep states** | | :+1: | :+1: |
75
74
  | **Finding non-crashing functional (logic) bugs** | | | :+1: |
76
75
 
76
+
77
77
  ## Kea2's Users
78
78
 
79
79
  Kea2 (and its idea) has been used/integrated by
80
80
 
81
- - [OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app (2 millions of active users daily). OPay uses Kea2 for regression testing on POS machines and mobile devices.
81
+ <img src="https://github.com/user-attachments/assets/8334d717-c9d2-4fda-ad9b-611fa37935b4" alt="OPay" height="70" style="border-radius: 14px;"/> <img src="https://github.com/user-attachments/assets/f4eefbe3-1a4c-4a6e-acca-b97d35e34487" alt="Huawei" height="70" style="border-radius: 14px;"/> <img src="https://github.com/user-attachments/assets/c8da7eb1-c7bd-4fc8-ac7c-ee241168566c" alt="WeChat Pay" height="70" style="border-radius: 14px;"/> <img src="https://github.com/user-attachments/assets/cef587b2-0142-40ed-91f0-baf087d0a03a" alt="WeChat" height="70" style="border-radius: 14px;"/>
82
+
83
+
84
+ - [OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app (20 millions of active users daily). OPay uses Kea2 for regression testing on POS machines and mobile devices.
82
85
 
83
86
  - [WeChat's iExplorer]() --- WeChat's in-house testing platform (coming with an interactive UI-based tool to ease writing scripts)
84
87
 
@@ -91,12 +94,15 @@ Kea2 (and its idea) has been used/integrated by
91
94
  Please let us know and willing to hear your feedback/questions if you are also using Kea2.
92
95
 
93
96
  ## Design & Roadmap
94
- Kea2 currently works with:
97
+
98
+ **Kea2 currently works with 3 open-sourced projects:**
95
99
  - [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
96
100
  - [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
97
- - [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
101
+ - [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
102
+
103
+ Several key features of Kea2 are inspired by **[Hypothesis](https://github.com/HypothesisWorks/hypothesis)**, the property-based testing framework for Python.
98
104
 
99
- In the future, Kea2 will be extended to support
105
+ **In the future, Kea2 will be extended to support:**
100
106
  - [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
101
107
  - [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
102
108
  - any other automated UI testing tools (not limited to Fastbot)
@@ -107,7 +113,7 @@ In the future, Kea2 will be extended to support
107
113
  Running environment:
108
114
  - support Windows, MacOS and Linux
109
115
  - python 3.8+, Android 5.0~16.0 (Android SDK installed)
110
- - **VPN closed** (Features 2 and 3 required)
116
+ - **Disable localhost proxy** (some VPNs affect u2). Set it to bypass `localhost` or turn off the VPN if needed. (Required for Features 2 and 3.)
111
117
 
112
118
  Install Kea2 by `pip`:
113
119
  ```bash
@@ -158,24 +164,25 @@ Otherwise, please help [file a bug report](https://github.com/ecnusse/Kea2/issue
158
164
 
159
165
 
160
166
 
161
- ## Feature 1(运行基础版Fastbot:查找稳定性错误)
167
+ ## Feature 1 (Find crashes with the full capability of Fastbot and get kea2 test reports)
162
168
 
163
169
  Test your app with the full capability of Fastbot for stress testing and finding *stability problems* (i.e., *crashing bugs*);
170
+ Meanwhile, you can get test reports generated by Kea2 to understand app behaviors and discovered bugs during testing.
164
171
 
165
172
  ```bash
166
- kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 --throttle 200
173
+ kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10
167
174
  ```
168
175
 
169
- To understand the meanings of the options, you can see our [user manual](docs/manual_en.md#launching-kea2).
176
+ To understand the meanings of the options, you can see our [user manual](/docs/manual_en.md#launch-kea2).
170
177
 
171
- > The usage is similar to the the original Fastbot's [shell commands](https://github.com/bytedance/Fastbot_Android?tab=readme-ov-file#run-fastbot-with-shell-command).
178
+ > The usage is similar to the the original Fastbot's [shell commands](https://github.com/bytedance/Fastbot_Android?tab=readme-ov-file#run-fastbot-with-shell-command).
172
179
 
173
180
  See more options by
174
181
  ```bash
175
182
  kea2 run -h
176
183
  ```
177
184
 
178
- ## Feature 2(运行增强版Fastbot:自定义测试场景\事件序列\黑白控件)
185
+ ## Feature 2 (Run Enhanced Fastbot: Custom Testing Scenarios/Event Sequences/Widget Whitelists and Blacklists)
179
186
 
180
187
  When running any automated UI testing tools like Fastbot to test your apps, you may find that some specifc UI pages or functionalities are difficult to reach or cover. The reason is that Fastbot lacks knowledge of your apps. Fortunately, this is the strength of script testing. In Feature 2, Kea2 can support writing small scripts to guide Fastbot to explore wherever we want. You can also use such small scripts to block specific widgets during UI testing.
181
188
 
@@ -212,10 +219,10 @@ You can find the full example in script `quicktest.py`, and run this script with
212
219
 
213
220
  ```bash
214
221
  # Launch Kea2 and load one single script quicktest.py.
215
- kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 --throttle 200 --driver-name d propertytest discover -p quicktest.py
222
+ kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 propertytest discover -p quicktest.py
216
223
  ```
217
224
 
218
- ## Feature 3(运行增强版Fastbot:加入自动断言)
225
+ ## Feature 3 (Run Enhanced Fastbot: Add Assertions)
219
226
 
220
227
  Kea2 supports auto-assertions when running Fastbot for finding *logic bugs* (i.e., *non-crashing bugs*). To achieve this, you can add assertions in the scripts. When an assertion fails during automated UI testing, we find a likely functional bug.
221
228
 
@@ -266,160 +273,76 @@ For the preceding always-holding property, we can write the following script to
266
273
 
267
274
  You can run this example by using the similar command line in Feature 2.
268
275
 
269
- ## Feature 4(兼容已有脚本:通过前置脚本步骤到达特定层次)
270
-
271
- Kea2 supports reusing existing Ui test Scripts. We are inspired by the idea that: *The existing Ui test scripts usually cover important app functionalities and can reach deep app states. Thus, they can be used as good "guiding scripts" to drive Fastbot to explore important and deep app states.*
272
-
273
- For example, you may already have some existing Ui test scripts "login and add a friend", This feature allows you to use the existing script, set some breakpoints (i.e., interruptable points) in the script, and launch Fastbot to explore the app after every breakpoint. By using this feature, you can do the login first and then launch Fastbot to explore the app after login. Which helps Fastbot to explore deep app states. (fastbot can't do login by itself easily).
274
-
275
- ### Example
276
-
277
- Here are four example scripts in hybridetest_examples, each corresponding to different forms of user scripts, showing you how to launch kea2 in the existing code.
278
-
279
- Specifically:
280
-
281
- * [u2_unittest_example.py](hybridtest_examples\u2_unittest_example.py) is a u2 script organized with unittest.
282
- * [u2_pytest_example.py](hybridtest_examples\u2_pytest_example.py) is a u2 script organized with pytest.
283
- * [appium_unittest_example.py](hybridtest_examples\appium_unittest_example.py) is an appium script organized with unittest.
284
- * [appium_pytest_example.py](hybridtest_examples\appium_pytest_example.py) is an appium script organized with pytest.
285
276
 
286
- Some notes:
287
277
 
288
- 1. You can control whether to execute the kea2-related code you have written by modifying the condition of 'if'. This allows you to easily enable or disable kea2 operations in the same script. Here we use environment variable as an example.
289
- 2. Since kea2 is driven by u2, if an appium-written script wants to launch kea2, it is necessary to first close the appium session. Remember to configure the parameter `"noReset": True` in `desired_caps` to avoid resetting the application when closing the session.
290
- 3. You need to insert the following code template into your existing test cases: Here, you can add your own hook logic in the commented sections, including starting or stopping the appium session, cleaning up instances, etc. This depends on how you want to design the setup and teardown. Apart from that, you only need to configure the `option` parameter and `configs_path` parameter(where your directory `configs` located, btw, `configs`'s location dependon where you executed `kea2 init`), then pass it to the `run_kea2_testing` function.
291
278
 
292
- ```python
293
- from kea2 import Kea2Tester, Options
294
-
295
- if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
296
- '''
297
- Note: The if condition here can be modified as needed according to the actual
298
- situation of the project, the form of environment variables is just an example.
299
- '''
300
-
301
- # close your driver session etc. here
302
- # ...
303
-
304
- tester = Kea2Tester()
305
- result = self.tester.run_kea2_testing(
306
- Options(
307
- driverName="d",
308
- packageNames=[PACKAGE_NAME],
309
- propertytest_args=["discover", "-p", "Omninotes_Sample.py"],
310
- serial=DEVICE_SERIAL,
311
- running_mins=2,
312
- maxStep=20
313
- ),
314
- configs_path = None # Default, if your configs folder is located in the root directory, miss this.
315
- )
316
-
317
- # restart your driver session or clean instance here
318
- # ...
319
-
320
- return # this make your following steps of this testcase not work
321
- ```
322
279
 
323
-
324
-
325
- ## Test Reports(测试报告)
280
+ ## Test Reports
326
281
 
327
282
  Kea2 automatically generates a HTML test report after each testing session. You can find the report in `output/` under your working directory.
283
+ <div align="center">
284
+ <img style="border-radius: 14px; width: 70%; height: 70%;" src="https://github.com/user-attachments/assets/83a30d44-1884-4098-8062-9bab62bfdb19" />
285
+ </div>
328
286
 
329
- You can also manually generate the test report by
330
- ```bash
331
- kea2 report -p [RES_DIR]
332
- ```
333
-
334
- Use `-s/--sync` to sync data from device before generating the report, and `-p/--path` to point to one or more result directories.
335
- For example:
336
-
337
- ```bash
338
- `kea2 report -p output/res_YYYYMMDDHH_xxxxxx`
339
- `kea2 report -s -p output/res_YYYYMMDDHH_xxxxxx`
340
- ```
341
-
342
- You can also merge the test report from multiple testing sessions by
343
-
344
- ```bash
345
- kea2 merge -p [RES_DIR1] [RES_DIR2] ... -o [OUTPUT_DIR]
346
- ```
287
+ #### Sample test reports
288
+ - [Single test report](https://ecnusse.github.io/Kea2_sample_report/) - Courtesy of Opay.
289
+ - [Merged test report (multiple runs)](https://ecnusse.github.io/kea2_sample_test_report/) - Summary for multiple runs.
347
290
 
348
- The merged test report is quite useful if you would test your apps for multiple sessions.
291
+ > You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
349
292
 
350
- > You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
351
293
 
352
- ## Documentations(更多文档)
294
+ ## :blue_book: User Manual (用户手册)
353
295
 
296
+ Please see the [user manual](/docs/manual_en.md) for more details on how to use Kea2.
354
297
 
355
- ### :blue_book: [User Manual](docs/manual_en.md) (Important!)
356
- You can find the [user manual](docs/manual_en.md), which includes:
357
- - Examples of using Kea2 on WeChat (in Chinese);
358
- - How to define Kea2's scripts and use the decorators (e.g., `@precondition`、`@prob`、`@max_tries`);
359
- - How to run Kea2 and Kea2's command line options
360
- - How to find and understand Kea2's testing results
361
- - How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
298
+ 请查看[用户手册](/docs/manual_cn.md)以获取更多Kea2的详细文档。
362
299
 
363
- ### Other resources about Kea2 (in Chinese)
364
- - [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
365
- - [Kea2 101 (Kea2 从0到1 的入门教程与最佳实践,建议新手阅读)](https://sy8pzmhmun.feishu.cn/wiki/EwaWwPCitiUJoBkIgALcHtglnDK?from=from_copylink)
366
- - [Kea2 分享交流会 (2025.09, bilibili 录播)](https://www.bilibili.com/video/BV1CZYNz9Ei5/)
367
- - [Kea2 工具快速介绍 (2025.11, bilibili 录播)](https://www.bilibili.com/video/BV1WAyUBDEMw/)
368
300
 
369
- Some blogs on Kea/Kea2 (in Chinese):
370
- - [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
371
- - [别再苦哈哈写测试脚本了,生成它们吧!()](https://mp.weixin.qq.com/s/s4WkdstNcKupu9OP8jeOXw)
372
- - [别再苦哈哈写测试脚本了,生成它们吧!(三)](https://mp.weixin.qq.com/s/BjXyo-xJRmPB_sCc4pmh8g)
373
- - [2025 Let’s GoSSIP 软件安全暑期学校预告第一弹——Kea2](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
374
- - [功能性质驱动的测试技术:下一代GUI自动化测试技术](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) --- 视频回放&PPT@MTSC 2025
301
+ ## :mega: News & Media
302
+ - [Property-driven Testing Technology: Next-generation GUI Automated Testing](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) - Video replay and slides @ MTSC 2025
303
+ - [Let's GoSSIP 2025 Software Security Summer School: Kea2 (Preview #1)](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
375
304
 
376
- 工业界对Kea2的理解和评价(点击箭头查看详情):
305
+ Industry perspectives on Kea2 (click to expand, courtesy of Opay):
377
306
 
378
307
  <details>
379
- <summary>Kea2的性质是什么含义?Kea2意义和价值是什么?</summary>
308
+ <summary>What does a “property” mean in Kea2? What is Kea2's value?</summary>
380
309
 
381
- kea2 其实是一个工具,它是python+u2+fastbot的集合体。 它本身更像是一台装好了发动机和轮子的汽车底盘。
310
+ Kea2 is essentially a toolkit that combines Python, uiautomator2, and Fastbot. It is like a vehicle chassis with an engine and wheels already assembled.
382
311
 
383
- 性质是苏老师他们团队提出的一个概念, 转换到测试领域的实际工作中,性质对应的是最小单位的功能(原子级功能),性质的依赖条件很少或没有,它可以自身运行。一个典型的性质就是登录,它仅仅具有输入用户名,输入密码,提交。再举个例子,给视频点个赞,也就是简单的两三步。就是一个性质。
312
+ The concept of “property” was introduced by Prof. Su's team. In practical testing work, a property corresponds to a minimal, atomic app function with little or no dependency on other flows, so it can run independently. Typical examples include login (enter username, enter password, submit) or liking a video with just a few steps.
384
313
 
385
- 性质与kea2结合的意义是在于解决过去使用appium过重的问题。用appium去测试一个性质通常要写很多行的代码,引导界面到达性质的位置。但使用kea2,就只需要编写性质,如何到其所在的位置是交给fastbot和它的学习算法来搞定的。
314
+ The value of combining properties with Kea2 is that it addresses the “heavy scripting” issue in Appium-style tests. With Appium, testing one property often requires many lines of navigation code. With Kea2, you mainly define the property itself, and Fastbot plus its learning strategy handles how to reach the target state.
386
315
 
387
- kea2另个重大的价值是,它解决了上述思想所需要的技术支撑,比appium更轻量的UI编写方式,fastbot编写性质的能力不足,以及无法编写逻辑和断言。整体上是保留了fastbot以往的优秀品质,完善了其不足和短板。
316
+ Another major value is technical enablement: Kea2 provides lighter UI scripting than Appium, while compensating for Fastbot's original limitations in property logic and assertions. It preserves Fastbot's strengths and fills key capability gaps.
388
317
 
389
- 简而言之,需要做传统的编排型的功能测试,仍然使用appium,使用kea2也行,但你感觉不到它的价值。本身有需要做混沌测试,模糊测试,兼容性测试。那么强烈,强烈推荐kea2。kea2更偏探索性测试而非编排型。
318
+ In short, for strictly orchestrated functional test cases, Appium is still a fine choice. But if your goal is exploratory testing, fuzz/stress testing, or compatibility testing, Kea2 is strongly recommended.
390
319
  </details>
391
320
 
392
321
  <details>
393
- <summary>kea2组成是什么?kea2的核心作用?kea2做了什么?</summary>
322
+ <summary>What is Kea2 made of? What is its core role? What has it changed?</summary>
394
323
 
395
- kea2 组成:
324
+ Kea2 is composed of:
396
325
 
397
- fastbot -- fuzz测试引擎,负责跑路。
398
- u2 -- 负责进行业务空间的操作。与使用selenium,appium,没什么区别。
399
- python -- u2的操作,逻辑的编写,定制化的实现。
326
+ Fastbot -- the fuzzing engine that drives large-scale exploration.
327
+ u2 -- executes business-level UI actions, similar in spirit to Selenium/Appium interactions.
328
+ Python -- used to write UI actions, logic, and custom behaviors.
400
329
 
401
- kea2的核心作用:
330
+ Kea2's core role:
402
331
 
403
- 提供了条件触发器。 在FB跑路的时候,会不停遍历条件触发器,一旦触发,挂起FB,开始执行触发器指定的 ui test assert。执行完毕,继续切回FB跑路。
332
+ It provides condition triggers. While Fastbot is exploring, Kea2 continuously evaluates trigger conditions. When a condition is met, Fastbot is paused, the specified UI test/assertions are executed, and then control returns to Fastbot.
404
333
 
405
- kea2做了什么:
334
+ What Kea2 has changed:
406
335
 
407
- 替换了FB的条件触发功能。
408
- 替换了FB的黑名单,黑控件功能。
409
- 替换了FB剪枝功能。
410
- 增加了多元化的元素空间操作能力。
411
- 增加了fuzz测试中的 逻辑设定。
412
- 增加了断言能力。
413
- 增加了元素操作能力。
336
+ Replaced Fastbot's original condition-trigger mechanism.
337
+ Replaced Fastbot's activity/widget blacklist mechanism.
338
+ Replaced Fastbot's pruning mechanism.
339
+ Added richer element-space operation capabilities.
340
+ Added logic modeling in fuzz testing workflows.
341
+ Added assertion support.
342
+ Expanded UI element interaction capabilities.
414
343
  </details>
415
344
 
416
345
 
417
- ## Open-source projects used by Kea2
418
-
419
- - [Fastbot](https://github.com/bytedance/Fastbot_Android)
420
- - [uiautomator2](https://github.com/openatx/uiautomator2)
421
- - [hypothesis](https://github.com/HypothesisWorks/hypothesis)
422
-
423
346
  ## Relevant papers of Kea2
424
347
 
425
348
  > General and Practical Property-based Testing for Android Apps. ASE 2024. [pdf](https://dl.acm.org/doi/10.1145/3691620.3694986)
@@ -430,7 +353,18 @@ kea2做了什么:
430
353
 
431
354
  > Guided, Stochastic Model-Based GUI Testing of Android Apps. ESEC/FSE 2017. [pdf](https://dl.acm.org/doi/10.1145/3106237.3106298)
432
355
 
433
- ## Maintainers/Contributors
356
+
357
+ ## Contact us
358
+
359
+ Please contact Xixian Liang at [xixian@stu.ecnu.edu.cn](xixian@stu.ecnu.edu.cn) with your Wechat ID / QR code to be invited to the WeChat discussion group.
360
+
361
+ Of course, we are also ready on GitHub to answer your questions/feedback.
362
+
363
+ <div align="center">
364
+ <img src="https://github.com/user-attachments/assets/8d9f8750-1e10-411b-a49f-7d8367bbe9fe" style="border-radius: 14px; width: 20%; height: 20%;"/>
365
+ </div>
366
+
367
+ ### Maintainers/Contributors
434
368
 
435
369
  Kea2 has been actively developed and maintained by the people in [ecnusse](https://github.com/ecnusse):
436
370
 
@@ -458,6 +392,6 @@ See [Developer guide](DEVELOP.md) for more details.
458
392
 
459
393
  [![Star History Chart](https://api.star-history.com/svg?repos=ecnusse/Kea2&type=Date)](https://www.star-history.com/#ecnusse/Kea2&Date)
460
394
 
461
- [^1]: 不少UI自动化测试工具提供了“自定义事件序列”能力(如[Fastbot](https://github.com/bytedance/Fastbot_Android/blob/main/handbook-cn.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8B%E4%BB%B6%E5%BA%8F%E5%88%97) [AppCrawler](https://github.com/seveniruby/AppCrawler)),但在实际使用中存在不少问题,如自定义能力有限、使用不灵活等。此前不少Fastbot用户抱怨过其“自定义事件序列”在使用中的问题,如[#209](https://github.com/bytedance/Fastbot_Android/issues/209), [#225](https://github.com/bytedance/Fastbot_Android/issues/225), [#286](https://github.com/bytedance/Fastbot_Android/issues/286)等。
395
+ [^1]: Many UI automated testing tools provide “custom event sequence” features (such as [Fastbot](https://github.com/bytedance/Fastbot_Android/blob/main/handbook-cn.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8B%E4%BB%B6%E5%BA%8F%E5%88%97) and [AppCrawler](https://github.com/seveniruby/AppCrawler)), but these features often have practical limitations, such as restricted flexibility and difficult maintenance. Many Fastbot users have reported issues with its custom event sequence capability, e.g., [#209](https://github.com/bytedance/Fastbot_Android/issues/209), [#225](https://github.com/bytedance/Fastbot_Android/issues/225), and [#286](https://github.com/bytedance/Fastbot_Android/issues/286).
462
396
 
463
- [^2]: UI自动化测试过程中支持自动断言是一个很重要的能力,但几乎没有测试工具提供这样的能力。我们注意到[AppCrawler](https://ceshiren.com/t/topic/15801/5)的开发者曾经希望提供一种断言机制,得到了用户的热切响应,不少用户从21年就开始催更,但始终未能实现。
397
+ [^2]: Supporting automatic assertions during UI automated testing is an important capability, but very few tools provide it. We noticed that the developers of [AppCrawler](https://ceshiren.com/t/topic/15801/5) once planned to introduce an assertion mechanism; the idea received strong user interest, and users kept asking for updates since 2021, but it has not been delivered.
@@ -12,6 +12,7 @@ kea2/adbUtils.py
12
12
  kea2/cli.py
13
13
  kea2/fastbotManager.py
14
14
  kea2/fbm_parser.py
15
+ kea2/fbm_plugin.py
15
16
  kea2/fs_lock.py
16
17
  kea2/kea2_api.py
17
18
  kea2/keaUtils.py
@@ -2,4 +2,5 @@ rtree>=1.3.0
2
2
  jinja2>=3.0.0
3
3
  uiautomator2>=3.3.3
4
4
  adbutils>=2.9.3
5
+ flatbuffers>=25.9.23
5
6
  packaging>=25.0