Kea2-python 1.1.3b2__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.
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/PKG-INFO +85 -152
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/PKG-INFO +85 -152
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/README.md +84 -151
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/widget.block.py +0 -2
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/cli.py +3 -3
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fastbotManager.py +10 -26
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fbm_plugin.py +4 -4
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/keaUtils.py +123 -129
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/kea_launcher.py +59 -31
- kea2_python-1.2.0/kea2/logWatcher.py +144 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/bug_report_generator.py +9 -8
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/widget_coverage.py +15 -1
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/result.py +1 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/utils.py +1 -1
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/pyproject.toml +1 -1
- kea2_python-1.1.3b2/kea2/logWatcher.py +0 -107
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/SOURCES.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/requires.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/LICENSE +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/adbUtils.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/config_version.json +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_configs/teardown.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/framework.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/kea2-thirdpart.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/assets/quicktest.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fastbotx/ActivityTimes.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fastbotx/ReuseEntry.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fastbotx/ReuseModel.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fastbotx/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fbm_parser.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/fs_lock.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/kea2_api.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/mixin.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/mixin.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/report_merger.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/templates/bug_report_template.html +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/templates/merged_bug_report_template.html +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/report/utils.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/resultSyncer.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/state.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/typedefs.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/u2Driver.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/kea2/version_manager.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/setup.cfg +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.0}/tests/test_u2Selector.py +0 -0
- {kea2_python-1.1.3b2 → 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.
|
|
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
|
|
@@ -21,22 +21,10 @@ Dynamic: license-file
|
|
|
21
21
|

|
|
22
22
|
[](https://deepwiki.com/ecnusse/Kea2)
|
|
23
23
|
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
|
|
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.
|
|
30
|
-
|
|
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)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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)
|
|
36
26
|
|
|
37
|
-
### [
|
|
38
|
-
|
|
39
|
-
## About
|
|
27
|
+
### English | [简体中文](/README_cn.md)
|
|
40
28
|
|
|
41
29
|
<div align="center">
|
|
42
30
|
<img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
@@ -46,11 +34,21 @@ Please contact Xixian Liang at [xixian@stu.ecnu.edu.cn](xixian@stu.ecnu.edu.cn)
|
|
|
46
34
|
</div>
|
|
47
35
|
</br>
|
|
48
36
|
|
|
37
|
+
### [:blue_book: User Manual](/docs/manual_en.md) | [:blue_book: 用户手册](/docs/manual_cn.md)
|
|
38
|
+
|
|
39
|
+
## About
|
|
40
|
+
|
|
49
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*.
|
|
50
42
|
|
|
51
|
-
Kea2 is currently built on top of [Fastbot](https://github.com/ecnusse/Fastbot_Android)
|
|
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*.
|
|
52
44
|
Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
|
|
53
45
|
|
|
46
|
+
|
|
47
|
+
https://github.com/user-attachments/assets/6120d8f5-5a9d-4ead-b27e-840c8757e28e
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
54
52
|
## Novelty & Important features
|
|
55
53
|
|
|
56
54
|
<div align="center">
|
|
@@ -75,11 +73,15 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
75
73
|
| **Finding crashes in deep states** | | :+1: | :+1: |
|
|
76
74
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
77
75
|
|
|
76
|
+
|
|
78
77
|
## Kea2's Users
|
|
79
78
|
|
|
80
79
|
Kea2 (and its idea) has been used/integrated by
|
|
81
80
|
|
|
82
|
-
|
|
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.
|
|
83
85
|
|
|
84
86
|
- [WeChat's iExplorer]() --- WeChat's in-house testing platform (coming with an interactive UI-based tool to ease writing scripts)
|
|
85
87
|
|
|
@@ -92,12 +94,15 @@ Kea2 (and its idea) has been used/integrated by
|
|
|
92
94
|
Please let us know and willing to hear your feedback/questions if you are also using Kea2.
|
|
93
95
|
|
|
94
96
|
## Design & Roadmap
|
|
95
|
-
|
|
97
|
+
|
|
98
|
+
**Kea2 currently works with 3 open-sourced projects:**
|
|
96
99
|
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
|
|
97
100
|
- [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.
|
|
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.
|
|
99
104
|
|
|
100
|
-
In the future, Kea2 will be extended to support
|
|
105
|
+
**In the future, Kea2 will be extended to support:**
|
|
101
106
|
- [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
|
|
102
107
|
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
|
|
103
108
|
- any other automated UI testing tools (not limited to Fastbot)
|
|
@@ -108,7 +113,7 @@ In the future, Kea2 will be extended to support
|
|
|
108
113
|
Running environment:
|
|
109
114
|
- support Windows, MacOS and Linux
|
|
110
115
|
- python 3.8+, Android 5.0~16.0 (Android SDK installed)
|
|
111
|
-
- **
|
|
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.)
|
|
112
117
|
|
|
113
118
|
Install Kea2 by `pip`:
|
|
114
119
|
```bash
|
|
@@ -159,24 +164,25 @@ Otherwise, please help [file a bug report](https://github.com/ecnusse/Kea2/issue
|
|
|
159
164
|
|
|
160
165
|
|
|
161
166
|
|
|
162
|
-
## Feature 1(
|
|
167
|
+
## Feature 1 (Find crashes with the full capability of Fastbot and get kea2 test reports)
|
|
163
168
|
|
|
164
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.
|
|
165
171
|
|
|
166
172
|
```bash
|
|
167
|
-
kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10
|
|
173
|
+
kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10
|
|
168
174
|
```
|
|
169
175
|
|
|
170
|
-
To understand the meanings of the options, you can see our [user manual](docs/manual_en.md#
|
|
176
|
+
To understand the meanings of the options, you can see our [user manual](/docs/manual_en.md#launch-kea2).
|
|
171
177
|
|
|
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).
|
|
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).
|
|
173
179
|
|
|
174
180
|
See more options by
|
|
175
181
|
```bash
|
|
176
182
|
kea2 run -h
|
|
177
183
|
```
|
|
178
184
|
|
|
179
|
-
## Feature 2(
|
|
185
|
+
## Feature 2 (Run Enhanced Fastbot: Custom Testing Scenarios/Event Sequences/Widget Whitelists and Blacklists)
|
|
180
186
|
|
|
181
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.
|
|
182
188
|
|
|
@@ -213,10 +219,10 @@ You can find the full example in script `quicktest.py`, and run this script with
|
|
|
213
219
|
|
|
214
220
|
```bash
|
|
215
221
|
# Launch Kea2 and load one single script quicktest.py.
|
|
216
|
-
kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10
|
|
222
|
+
kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 propertytest discover -p quicktest.py
|
|
217
223
|
```
|
|
218
224
|
|
|
219
|
-
## Feature 3(
|
|
225
|
+
## Feature 3 (Run Enhanced Fastbot: Add Assertions)
|
|
220
226
|
|
|
221
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.
|
|
222
228
|
|
|
@@ -267,160 +273,76 @@ For the preceding always-holding property, we can write the following script to
|
|
|
267
273
|
|
|
268
274
|
You can run this example by using the similar command line in Feature 2.
|
|
269
275
|
|
|
270
|
-
## Feature 4(兼容已有脚本:通过前置脚本步骤到达特定层次)
|
|
271
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
276
|
|
|
287
|
-
Some notes:
|
|
288
277
|
|
|
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
278
|
|
|
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
279
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
## Test Reports(测试报告)
|
|
280
|
+
## Test Reports
|
|
327
281
|
|
|
328
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>
|
|
329
286
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
```
|
|
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.
|
|
348
290
|
|
|
349
|
-
|
|
291
|
+
> You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
|
|
350
292
|
|
|
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
293
|
|
|
353
|
-
##
|
|
294
|
+
## :blue_book: User Manual (用户手册)
|
|
354
295
|
|
|
296
|
+
Please see the [user manual](/docs/manual_en.md) for more details on how to use Kea2.
|
|
355
297
|
|
|
356
|
-
|
|
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
|
|
298
|
+
请查看[用户手册](/docs/manual_cn.md)以获取更多Kea2的详细文档。
|
|
363
299
|
|
|
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
300
|
|
|
370
|
-
|
|
371
|
-
-
|
|
372
|
-
- [
|
|
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
|
|
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)
|
|
376
304
|
|
|
377
|
-
|
|
305
|
+
Industry perspectives on Kea2 (click to expand, courtesy of Opay):
|
|
378
306
|
|
|
379
307
|
<details>
|
|
380
|
-
<summary>Kea2
|
|
308
|
+
<summary>What does a “property” mean in Kea2? What is Kea2's value?</summary>
|
|
381
309
|
|
|
382
|
-
|
|
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.
|
|
383
311
|
|
|
384
|
-
|
|
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.
|
|
385
313
|
|
|
386
|
-
|
|
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.
|
|
387
315
|
|
|
388
|
-
|
|
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.
|
|
389
317
|
|
|
390
|
-
|
|
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.
|
|
391
319
|
</details>
|
|
392
320
|
|
|
393
321
|
<details>
|
|
394
|
-
<summary>
|
|
322
|
+
<summary>What is Kea2 made of? What is its core role? What has it changed?</summary>
|
|
395
323
|
|
|
396
|
-
|
|
324
|
+
Kea2 is composed of:
|
|
397
325
|
|
|
398
|
-
|
|
399
|
-
u2 --
|
|
400
|
-
|
|
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.
|
|
401
329
|
|
|
402
|
-
|
|
330
|
+
Kea2's core role:
|
|
403
331
|
|
|
404
|
-
|
|
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.
|
|
405
333
|
|
|
406
|
-
|
|
334
|
+
What Kea2 has changed:
|
|
407
335
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
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.
|
|
415
343
|
</details>
|
|
416
344
|
|
|
417
345
|
|
|
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
346
|
## Relevant papers of Kea2
|
|
425
347
|
|
|
426
348
|
> General and Practical Property-based Testing for Android Apps. ASE 2024. [pdf](https://dl.acm.org/doi/10.1145/3691620.3694986)
|
|
@@ -431,7 +353,18 @@ kea2做了什么:
|
|
|
431
353
|
|
|
432
354
|
> Guided, Stochastic Model-Based GUI Testing of Android Apps. ESEC/FSE 2017. [pdf](https://dl.acm.org/doi/10.1145/3106237.3106298)
|
|
433
355
|
|
|
434
|
-
|
|
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
|
|
435
368
|
|
|
436
369
|
Kea2 has been actively developed and maintained by the people in [ecnusse](https://github.com/ecnusse):
|
|
437
370
|
|
|
@@ -459,6 +392,6 @@ See [Developer guide](DEVELOP.md) for more details.
|
|
|
459
392
|
|
|
460
393
|
[](https://www.star-history.com/#ecnusse/Kea2&Date)
|
|
461
394
|
|
|
462
|
-
[^1]:
|
|
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).
|
|
463
396
|
|
|
464
|
-
[^2]:
|
|
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.
|