Kea2-python 1.1.3b2__tar.gz → 1.2.1__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 (64) hide show
  1. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/PKG-INFO +88 -154
  2. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/PKG-INFO +88 -154
  3. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/README.md +87 -153
  4. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/widget.block.py +0 -2
  5. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/quicktest.py +22 -16
  6. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/cli.py +3 -3
  7. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotManager.py +10 -26
  8. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fbm_plugin.py +4 -4
  9. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/keaUtils.py +123 -129
  10. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/kea_launcher.py +59 -31
  11. kea2_python-1.2.1/kea2/logWatcher.py +144 -0
  12. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/bug_report_generator.py +23 -18
  13. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/widget_coverage.py +30 -1
  14. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/result.py +1 -0
  15. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/utils.py +1 -1
  16. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/pyproject.toml +1 -1
  17. kea2_python-1.1.3b2/kea2/logWatcher.py +0 -107
  18. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/SOURCES.txt +0 -0
  19. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/dependency_links.txt +0 -0
  20. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/entry_points.txt +0 -0
  21. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/requires.txt +0 -0
  22. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/top_level.txt +0 -0
  23. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/LICENSE +0 -0
  24. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/__init__.py +0 -0
  25. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/adbUtils.py +0 -0
  26. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/config_version.json +0 -0
  27. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot-thirdpart.jar +0 -0
  28. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/abl.strings +0 -0
  29. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/awl.strings +0 -0
  30. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.config +0 -0
  31. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
  32. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
  33. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.strings +0 -0
  34. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
  35. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/teardown.py +0 -0
  36. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  37. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  38. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
  39. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  40. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/framework.jar +0 -0
  41. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/kea2-thirdpart.jar +0 -0
  42. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/monkeyq.jar +0 -0
  43. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ActivityTimes.py +0 -0
  44. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ReuseEntry.py +0 -0
  45. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ReuseModel.py +0 -0
  46. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/__init__.py +0 -0
  47. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fbm_parser.py +0 -0
  48. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fs_lock.py +0 -0
  49. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/kea2_api.py +0 -0
  50. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/mixin.py +0 -0
  51. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/__init__.py +0 -0
  52. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/mixin.py +0 -0
  53. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/report_merger.py +0 -0
  54. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/templates/bug_report_template.html +0 -0
  55. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/templates/merged_bug_report_template.html +0 -0
  56. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/utils.py +0 -0
  57. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/resultSyncer.py +0 -0
  58. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/state.py +0 -0
  59. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/typedefs.py +0 -0
  60. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/u2Driver.py +0 -0
  61. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/version_manager.py +0 -0
  62. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/setup.cfg +0 -0
  63. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/tests/test_u2Selector.py +0 -0
  64. {kea2_python-1.1.3b2 → kea2_python-1.2.1}/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.3b2
3
+ Version: 1.2.1
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
@@ -14,43 +14,42 @@ Requires-Dist: flatbuffers>=25.9.23
14
14
  Requires-Dist: packaging>=25.0
15
15
  Dynamic: license-file
16
16
 
17
-
17
+ <div align="center">
18
18
 
19
19
  [![PyPI](https://img.shields.io/pypi/v/kea2-python.svg)](https://pypi.python.org/pypi/kea2-python)
20
20
  [![PyPI Downloads](https://static.pepy.tech/badge/kea2-python)](https://pepy.tech/projects/kea2-python)
21
21
  ![Python](https://img.shields.io/badge/python-3.8%2B-blue)
22
22
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ecnusse/Kea2)
23
23
 
24
- <div>
25
- <img src="https://github.com/user-attachments/assets/8d9f8750-1e10-411b-a49f-7d8367bbe9fe" style="border-radius: 14px; width: 20%; height: 20%;"/>
26
- </div>
27
-
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-333333?style=for-the-badge&logo=gitee&logoColor=white" />](https://gitee.com/XixianLiang/Kea2)
28
26
 
29
- 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.
27
+ **English | [简体中文](/README_cn.md)**
30
28
 
31
- #### Github repo [https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
32
- #### Gitee mirror [https://gitee.com/XixianLiang/Kea2](https://gitee.com/XixianLiang/Kea2)
29
+ </br>
33
30
 
31
+ <img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
34
32
 
33
+ <a href="https://en.wikipedia.org/wiki/Kea">Kea2's logo: A large parrot skilled in finding "bugs"</a>
35
34
 
35
+ </div>
36
+ </br>
36
37
 
37
- ### [点击此处:查看中文文档](README_cn.md)
38
+ ### [:blue_book: User Manual](/docs/manual_en.md) | [:blue_book: 用户手册](/docs/manual_cn.md)
38
39
 
39
40
  ## About
40
41
 
41
- <div align="center">
42
- <img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
43
- </div>
44
- <div align="center">
45
- <a href="https://en.wikipedia.org/wiki/Kea">Kea2's logo: A large parrot skilled in finding "bugs"</a>
46
- </div>
47
- </br>
48
-
49
42
  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*.
50
43
 
51
- 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*.
44
+ 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*.
52
45
  Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
53
46
 
47
+
48
+ https://github.com/user-attachments/assets/6120d8f5-5a9d-4ead-b27e-840c8757e28e
49
+
50
+
51
+
52
+
54
53
  ## Novelty & Important features
55
54
 
56
55
  <div align="center">
@@ -75,11 +74,15 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
75
74
  | **Finding crashes in deep states** | | :+1: | :+1: |
76
75
  | **Finding non-crashing functional (logic) bugs** | | | :+1: |
77
76
 
77
+
78
78
  ## Kea2's Users
79
79
 
80
80
  Kea2 (and its idea) has been used/integrated by
81
81
 
82
- - [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.
82
+ <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;"/>
83
+
84
+
85
+ - [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.
83
86
 
84
87
  - [WeChat's iExplorer]() --- WeChat's in-house testing platform (coming with an interactive UI-based tool to ease writing scripts)
85
88
 
@@ -92,12 +95,15 @@ Kea2 (and its idea) has been used/integrated by
92
95
  Please let us know and willing to hear your feedback/questions if you are also using Kea2.
93
96
 
94
97
  ## Design & Roadmap
95
- Kea2 currently works with:
98
+
99
+ **Kea2 currently works with 3 open-sourced projects:**
96
100
  - [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
97
101
  - [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
98
- - [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
102
+ - [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
103
+
104
+ Several key features of Kea2 are inspired by **[Hypothesis](https://github.com/HypothesisWorks/hypothesis)**, the property-based testing framework for Python.
99
105
 
100
- In the future, Kea2 will be extended to support
106
+ **In the future, Kea2 will be extended to support:**
101
107
  - [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
102
108
  - [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
103
109
  - any other automated UI testing tools (not limited to Fastbot)
@@ -108,7 +114,7 @@ In the future, Kea2 will be extended to support
108
114
  Running environment:
109
115
  - support Windows, MacOS and Linux
110
116
  - python 3.8+, Android 5.0~16.0 (Android SDK installed)
111
- - **VPN closed** (Features 2 and 3 required)
117
+ - **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.)
112
118
 
113
119
  Install Kea2 by `pip`:
114
120
  ```bash
@@ -159,24 +165,25 @@ Otherwise, please help [file a bug report](https://github.com/ecnusse/Kea2/issue
159
165
 
160
166
 
161
167
 
162
- ## Feature 1(运行基础版Fastbot:查找稳定性错误)
168
+ ## Feature 1 (Find crashes with the full capability of Fastbot and get kea2 test reports)
163
169
 
164
170
  Test your app with the full capability of Fastbot for stress testing and finding *stability problems* (i.e., *crashing bugs*);
171
+ Meanwhile, you can get test reports generated by Kea2 to understand app behaviors and discovered bugs during testing.
165
172
 
166
173
  ```bash
167
- kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 --throttle 200
174
+ kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10
168
175
  ```
169
176
 
170
- To understand the meanings of the options, you can see our [user manual](docs/manual_en.md#launching-kea2).
177
+ To understand the meanings of the options, you can see our [user manual](/docs/manual_en.md#launch-kea2).
171
178
 
172
- > 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).
179
+ > 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).
173
180
 
174
181
  See more options by
175
182
  ```bash
176
183
  kea2 run -h
177
184
  ```
178
185
 
179
- ## Feature 2(运行增强版Fastbot:自定义测试场景\事件序列\黑白控件)
186
+ ## Feature 2 (Run Enhanced Fastbot: Custom Testing Scenarios/Event Sequences/Widget Whitelists and Blacklists)
180
187
 
181
188
  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.
182
189
 
@@ -213,10 +220,10 @@ You can find the full example in script `quicktest.py`, and run this script with
213
220
 
214
221
  ```bash
215
222
  # Launch Kea2 and load one single script quicktest.py.
216
- kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 --throttle 200 --driver-name d propertytest discover -p quicktest.py
223
+ kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 propertytest discover -p quicktest.py
217
224
  ```
218
225
 
219
- ## Feature 3(运行增强版Fastbot:加入自动断言)
226
+ ## Feature 3 (Run Enhanced Fastbot: Add Assertions)
220
227
 
221
228
  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.
222
229
 
@@ -267,160 +274,76 @@ For the preceding always-holding property, we can write the following script to
267
274
 
268
275
  You can run this example by using the similar command line in Feature 2.
269
276
 
270
- ## Feature 4(兼容已有脚本:通过前置脚本步骤到达特定层次)
271
277
 
272
- 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.*
273
278
 
274
- 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).
275
279
 
276
- ### Example
277
-
278
- 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.
279
-
280
- Specifically:
281
-
282
- * [u2_unittest_example.py](hybridtest_examples\u2_unittest_example.py) is a u2 script organized with unittest.
283
- * [u2_pytest_example.py](hybridtest_examples\u2_pytest_example.py) is a u2 script organized with pytest.
284
- * [appium_unittest_example.py](hybridtest_examples\appium_unittest_example.py) is an appium script organized with unittest.
285
- * [appium_pytest_example.py](hybridtest_examples\appium_pytest_example.py) is an appium script organized with pytest.
286
280
 
287
- Some notes:
288
-
289
- 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.
290
- 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.
291
- 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.
292
-
293
- ```python
294
- from kea2 import Kea2Tester, Options
295
-
296
- if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
297
- '''
298
- Note: The if condition here can be modified as needed according to the actual
299
- situation of the project, the form of environment variables is just an example.
300
- '''
301
-
302
- # close your driver session etc. here
303
- # ...
304
-
305
- tester = Kea2Tester()
306
- result = self.tester.run_kea2_testing(
307
- Options(
308
- driverName="d",
309
- packageNames=[PACKAGE_NAME],
310
- propertytest_args=["discover", "-p", "Omninotes_Sample.py"],
311
- serial=DEVICE_SERIAL,
312
- running_mins=2,
313
- maxStep=20
314
- ),
315
- configs_path = None # Default, if your configs folder is located in the root directory, miss this.
316
- )
317
-
318
- # restart your driver session or clean instance here
319
- # ...
320
-
321
- return # this make your following steps of this testcase not work
322
- ```
323
-
324
-
325
-
326
- ## Test Reports(测试报告)
281
+ ## Test Reports
327
282
 
328
283
  Kea2 automatically generates a HTML test report after each testing session. You can find the report in `output/` under your working directory.
284
+ <div align="center">
285
+ <img style="border-radius: 14px; width: 70%; height: 70%;" src="https://github.com/user-attachments/assets/83a30d44-1884-4098-8062-9bab62bfdb19" />
286
+ </div>
329
287
 
330
- You can also manually generate the test report by
331
- ```bash
332
- kea2 report -p [RES_DIR]
333
- ```
334
-
335
- Use `-s/--sync` to sync data from device before generating the report, and `-p/--path` to point to one or more result directories.
336
- For example:
337
-
338
- ```bash
339
- `kea2 report -p output/res_YYYYMMDDHH_xxxxxx`
340
- `kea2 report -s -p output/res_YYYYMMDDHH_xxxxxx`
341
- ```
342
-
343
- You can also merge the test report from multiple testing sessions by
344
-
345
- ```bash
346
- kea2 merge -p [RES_DIR1] [RES_DIR2] ... -o [OUTPUT_DIR]
347
- ```
288
+ #### Sample test reports
289
+ - [Single test report](https://ecnusse.github.io/Kea2_sample_report/) - Courtesy of Opay.
290
+ - [Merged test report (multiple runs)](https://ecnusse.github.io/kea2_sample_test_report/) - Summary for multiple runs.
348
291
 
349
- The merged test report is quite useful if you would test your apps for multiple sessions.
292
+ > You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
350
293
 
351
- > 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).
352
294
 
353
- ## Documentations(更多文档)
295
+ ## :blue_book: User Manual (用户手册)
354
296
 
297
+ Please see the [user manual](/docs/manual_en.md) for more details on how to use Kea2.
355
298
 
356
- ### :blue_book: [User Manual](docs/manual_en.md) (Important!)
357
- You can find the [user manual](docs/manual_en.md), which includes:
358
- - Examples of using Kea2 on WeChat (in Chinese);
359
- - How to define Kea2's scripts and use the decorators (e.g., `@precondition`、`@prob`、`@max_tries`);
360
- - How to run Kea2 and Kea2's command line options
361
- - How to find and understand Kea2's testing results
362
- - How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
299
+ 请查看[用户手册](/docs/manual_cn.md)以获取更多Kea2的详细文档。
363
300
 
364
- ### Other resources about Kea2 (in Chinese)
365
- - [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
366
- - [Kea2 101 (Kea2 从0到1 的入门教程与最佳实践,建议新手阅读)](https://sy8pzmhmun.feishu.cn/wiki/EwaWwPCitiUJoBkIgALcHtglnDK?from=from_copylink)
367
- - [Kea2 分享交流会 (2025.09, bilibili 录播)](https://www.bilibili.com/video/BV1CZYNz9Ei5/)
368
- - [Kea2 工具快速介绍 (2025.11, bilibili 录播)](https://www.bilibili.com/video/BV1WAyUBDEMw/)
369
301
 
370
- Some blogs on Kea/Kea2 (in Chinese):
371
- - [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
372
- - [别再苦哈哈写测试脚本了,生成它们吧!()](https://mp.weixin.qq.com/s/s4WkdstNcKupu9OP8jeOXw)
373
- - [别再苦哈哈写测试脚本了,生成它们吧!(三)](https://mp.weixin.qq.com/s/BjXyo-xJRmPB_sCc4pmh8g)
374
- - [2025 Let’s GoSSIP 软件安全暑期学校预告第一弹——Kea2](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
375
- - [功能性质驱动的测试技术:下一代GUI自动化测试技术](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) --- 视频回放&PPT@MTSC 2025
302
+ ## :mega: News & Media
303
+ - [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
304
+ - [Let's GoSSIP 2025 Software Security Summer School: Kea2 (Preview #1)](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
376
305
 
377
- 工业界对Kea2的理解和评价(点击箭头查看详情):
306
+ Industry perspectives on Kea2 (click to expand, courtesy of Opay):
378
307
 
379
308
  <details>
380
- <summary>Kea2的性质是什么含义?Kea2意义和价值是什么?</summary>
309
+ <summary>What does a “property” mean in Kea2? What is Kea2's value?</summary>
381
310
 
382
- kea2 其实是一个工具,它是python+u2+fastbot的集合体。 它本身更像是一台装好了发动机和轮子的汽车底盘。
311
+ Kea2 is essentially a toolkit that combines Python, uiautomator2, and Fastbot. It is like a vehicle chassis with an engine and wheels already assembled.
383
312
 
384
- 性质是苏老师他们团队提出的一个概念, 转换到测试领域的实际工作中,性质对应的是最小单位的功能(原子级功能),性质的依赖条件很少或没有,它可以自身运行。一个典型的性质就是登录,它仅仅具有输入用户名,输入密码,提交。再举个例子,给视频点个赞,也就是简单的两三步。就是一个性质。
313
+ 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.
385
314
 
386
- 性质与kea2结合的意义是在于解决过去使用appium过重的问题。用appium去测试一个性质通常要写很多行的代码,引导界面到达性质的位置。但使用kea2,就只需要编写性质,如何到其所在的位置是交给fastbot和它的学习算法来搞定的。
315
+ 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.
387
316
 
388
- kea2另个重大的价值是,它解决了上述思想所需要的技术支撑,比appium更轻量的UI编写方式,fastbot编写性质的能力不足,以及无法编写逻辑和断言。整体上是保留了fastbot以往的优秀品质,完善了其不足和短板。
317
+ 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.
389
318
 
390
- 简而言之,需要做传统的编排型的功能测试,仍然使用appium,使用kea2也行,但你感觉不到它的价值。本身有需要做混沌测试,模糊测试,兼容性测试。那么强烈,强烈推荐kea2。kea2更偏探索性测试而非编排型。
319
+ 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.
391
320
  </details>
392
321
 
393
322
  <details>
394
- <summary>kea2组成是什么?kea2的核心作用?kea2做了什么?</summary>
323
+ <summary>What is Kea2 made of? What is its core role? What has it changed?</summary>
395
324
 
396
- kea2 组成:
325
+ Kea2 is composed of:
397
326
 
398
- fastbot -- fuzz测试引擎,负责跑路。
399
- u2 -- 负责进行业务空间的操作。与使用selenium,appium,没什么区别。
400
- python -- u2的操作,逻辑的编写,定制化的实现。
327
+ Fastbot -- the fuzzing engine that drives large-scale exploration.
328
+ u2 -- executes business-level UI actions, similar in spirit to Selenium/Appium interactions.
329
+ Python -- used to write UI actions, logic, and custom behaviors.
401
330
 
402
- kea2的核心作用:
331
+ Kea2's core role:
403
332
 
404
- 提供了条件触发器。 在FB跑路的时候,会不停遍历条件触发器,一旦触发,挂起FB,开始执行触发器指定的 ui test assert。执行完毕,继续切回FB跑路。
333
+ 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.
405
334
 
406
- kea2做了什么:
335
+ What Kea2 has changed:
407
336
 
408
- 替换了FB的条件触发功能。
409
- 替换了FB的黑名单,黑控件功能。
410
- 替换了FB剪枝功能。
411
- 增加了多元化的元素空间操作能力。
412
- 增加了fuzz测试中的 逻辑设定。
413
- 增加了断言能力。
414
- 增加了元素操作能力。
337
+ Replaced Fastbot's original condition-trigger mechanism.
338
+ Replaced Fastbot's activity/widget blacklist mechanism.
339
+ Replaced Fastbot's pruning mechanism.
340
+ Added richer element-space operation capabilities.
341
+ Added logic modeling in fuzz testing workflows.
342
+ Added assertion support.
343
+ Expanded UI element interaction capabilities.
415
344
  </details>
416
345
 
417
346
 
418
- ## Open-source projects used by Kea2
419
-
420
- - [Fastbot](https://github.com/bytedance/Fastbot_Android)
421
- - [uiautomator2](https://github.com/openatx/uiautomator2)
422
- - [hypothesis](https://github.com/HypothesisWorks/hypothesis)
423
-
424
347
  ## Relevant papers of Kea2
425
348
 
426
349
  > General and Practical Property-based Testing for Android Apps. ASE 2024. [pdf](https://dl.acm.org/doi/10.1145/3691620.3694986)
@@ -431,7 +354,18 @@ kea2做了什么:
431
354
 
432
355
  > Guided, Stochastic Model-Based GUI Testing of Android Apps. ESEC/FSE 2017. [pdf](https://dl.acm.org/doi/10.1145/3106237.3106298)
433
356
 
434
- ## Maintainers/Contributors
357
+
358
+ ## Contact us
359
+
360
+ 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.
361
+
362
+ Of course, we are also ready on GitHub to answer your questions/feedback.
363
+
364
+ <div align="center">
365
+ <img src="https://github.com/user-attachments/assets/8d9f8750-1e10-411b-a49f-7d8367bbe9fe" style="border-radius: 14px; width: 20%; height: 20%;"/>
366
+ </div>
367
+
368
+ ### Maintainers/Contributors
435
369
 
436
370
  Kea2 has been actively developed and maintained by the people in [ecnusse](https://github.com/ecnusse):
437
371
 
@@ -459,6 +393,6 @@ See [Developer guide](DEVELOP.md) for more details.
459
393
 
460
394
  [![Star History Chart](https://api.star-history.com/svg?repos=ecnusse/Kea2&type=Date)](https://www.star-history.com/#ecnusse/Kea2&Date)
461
395
 
462
- [^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)等。
396
+ [^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).
463
397
 
464
- [^2]: UI自动化测试过程中支持自动断言是一个很重要的能力,但几乎没有测试工具提供这样的能力。我们注意到[AppCrawler](https://ceshiren.com/t/topic/15801/5)的开发者曾经希望提供一种断言机制,得到了用户的热切响应,不少用户从21年就开始催更,但始终未能实现。
398
+ [^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.