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.
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/PKG-INFO +88 -154
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/PKG-INFO +88 -154
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/README.md +87 -153
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/widget.block.py +0 -2
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/quicktest.py +22 -16
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/cli.py +3 -3
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotManager.py +10 -26
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fbm_plugin.py +4 -4
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/keaUtils.py +123 -129
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/kea_launcher.py +59 -31
- kea2_python-1.2.1/kea2/logWatcher.py +144 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/bug_report_generator.py +23 -18
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/widget_coverage.py +30 -1
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/result.py +1 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/utils.py +1 -1
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/pyproject.toml +1 -1
- kea2_python-1.1.3b2/kea2/logWatcher.py +0 -107
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/SOURCES.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/requires.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/LICENSE +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/adbUtils.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/config_version.json +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_configs/teardown.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/framework.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/kea2-thirdpart.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ActivityTimes.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ReuseEntry.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/ReuseModel.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fastbotx/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fbm_parser.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/fs_lock.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/kea2_api.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/mixin.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/__init__.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/mixin.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/report_merger.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/templates/bug_report_template.html +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/templates/merged_bug_report_template.html +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/report/utils.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/resultSyncer.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/state.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/typedefs.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/u2Driver.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/kea2/version_manager.py +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/setup.cfg +0 -0
- {kea2_python-1.1.3b2 → kea2_python-1.2.1}/tests/test_u2Selector.py +0 -0
- {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
|
|
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
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
20
20
|
[](https://pepy.tech/projects/kea2-python)
|
|
21
21
|

|
|
22
22
|
[](https://deepwiki.com/ecnusse/Kea2)
|
|
23
23
|
|
|
24
|
-
<
|
|
25
|
-
|
|
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
|
-
|
|
27
|
+
**English | [简体中文](/README_cn.md)**
|
|
30
28
|
|
|
31
|
-
|
|
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
|
-
### [
|
|
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)
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
- **
|
|
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(
|
|
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
|
|
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#
|
|
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(
|
|
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
|
|
223
|
+
kea2 run -p it.feio.android.omninotes.alpha --running-minutes 10 propertytest discover -p quicktest.py
|
|
217
224
|
```
|
|
218
225
|
|
|
219
|
-
## Feature 3(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
306
|
+
Industry perspectives on Kea2 (click to expand, courtesy of Opay):
|
|
378
307
|
|
|
379
308
|
<details>
|
|
380
|
-
<summary>Kea2
|
|
309
|
+
<summary>What does a “property” mean in Kea2? What is Kea2's value?</summary>
|
|
381
310
|
|
|
382
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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>
|
|
323
|
+
<summary>What is Kea2 made of? What is its core role? What has it changed?</summary>
|
|
395
324
|
|
|
396
|
-
|
|
325
|
+
Kea2 is composed of:
|
|
397
326
|
|
|
398
|
-
|
|
399
|
-
u2 --
|
|
400
|
-
|
|
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
|
-
|
|
331
|
+
Kea2's core role:
|
|
403
332
|
|
|
404
|
-
|
|
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
|
-
|
|
335
|
+
What Kea2 has changed:
|
|
407
336
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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
|
-
|
|
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
|
[](https://www.star-history.com/#ecnusse/Kea2&Date)
|
|
461
395
|
|
|
462
|
-
[^1]:
|
|
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]:
|
|
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.
|