Kea2-python 0.3.0__tar.gz → 0.3.2__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.
Potentially problematic release.
This version of Kea2-python might be problematic. Click here for more details.
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/PKG-INFO +71 -8
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/requires.txt +1 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/PKG-INFO +71 -8
- {kea2_python-0.3.0 → kea2_python-0.3.2}/README.md +69 -7
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/bug_report_generator.py +66 -75
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/fastbotManager.py +3 -2
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/keaUtils.py +11 -20
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/report_merger.py +29 -16
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/templates/bug_report_template.html +606 -285
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/templates/merged_bug_report_template.html +1057 -355
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/u2Driver.py +128 -5
- kea2_python-0.3.2/kea2/utils.py +112 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/pyproject.toml +4 -2
- kea2_python-0.3.0/kea2/utils.py +0 -71
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/SOURCES.txt +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/LICENSE +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/__init__.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/absDriver.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/adbUtils.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_configs/widget.block.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/framework.jar +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/kea2-thirdpart.jar +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/assets/quicktest.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/cli.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/kea_launcher.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/logWatcher.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/kea2/resultSyncer.py +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/setup.cfg +0 -0
- {kea2_python-0.3.0 → kea2_python-0.3.2}/tests/test_u2Selector.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Kea2-python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
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: setuptools>=75.3.2
|
|
13
14
|
Dynamic: license-file
|
|
14
15
|
|
|
15
16
|
|
|
@@ -17,6 +18,7 @@ Dynamic: license-file
|
|
|
17
18
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
18
19
|
[](https://pepy.tech/projects/kea2-python)
|
|
19
20
|

|
|
21
|
+
[](https://deepwiki.com/ecnusse/Kea2)
|
|
20
22
|
|
|
21
23
|
<div>
|
|
22
24
|
<img src="https://github.com/user-attachments/assets/84e47b87-2dd2-4d7e-91d1-e8c1d1db0cf4" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
@@ -31,6 +33,13 @@ The group has reached its capacity. Please contact Xixian Liang at [xixian@stu.e
|
|
|
31
33
|
|
|
32
34
|
## About
|
|
33
35
|
|
|
36
|
+
<div align="center">
|
|
37
|
+
<img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
38
|
+
</div>
|
|
39
|
+
<div align="center">
|
|
40
|
+
<a href="https://en.wikipedia.org/wiki/Kea">Kea2's logo: A large parrot skilled in finding "bugs"</a>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
34
43
|
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*.
|
|
35
44
|
|
|
36
45
|
Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android), *an industrial-strength automated UI testing tool*, and [uiautomator2](https://github.com/openatx/uiautomator2), *an easy-to-use and stable Android automation library*.
|
|
@@ -40,7 +49,7 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
40
49
|
|
|
41
50
|
<div align="center">
|
|
42
51
|
<div style="max-width:80%; max-height:80%">
|
|
43
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
52
|
+
<img src="docs/images/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
44
53
|
</div>
|
|
45
54
|
</div>
|
|
46
55
|
|
|
@@ -60,11 +69,17 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
60
69
|
| **Finding crashes in deep states** | | :+1: | :+1: |
|
|
61
70
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
62
71
|
|
|
63
|
-
## Kea2's
|
|
72
|
+
## Kea2's Users
|
|
73
|
+
|
|
74
|
+
Kea2 (and its idea) has been used/integrated by
|
|
64
75
|
|
|
65
|
-
[OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app
|
|
76
|
+
- [OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app. OPay uses Kea2 for regression testing on POS machines and mobile devices.
|
|
66
77
|
|
|
67
|
-
|
|
78
|
+
- [WeChat's iExplorer]() --- WeChat's in-house testing platform
|
|
79
|
+
|
|
80
|
+
- [ByteDance's Fastbot](https://github.com/bytedance/Fastbot_Android)
|
|
81
|
+
|
|
82
|
+
Please let us know and willing to hear your feedback/questions if you are also using Kea2.
|
|
68
83
|
|
|
69
84
|
## Design & Roadmap
|
|
70
85
|
Kea2 currently works with:
|
|
@@ -82,7 +97,7 @@ In the future, Kea2 will be extended to support
|
|
|
82
97
|
|
|
83
98
|
Running environment:
|
|
84
99
|
- support Windows, MacOS and Linux
|
|
85
|
-
- python 3.8+, Android 5.0
|
|
100
|
+
- python 3.8+, Android 5.0~16.0 (Android SDK installed)
|
|
86
101
|
- **VPN closed** (Features 2 and 3 required)
|
|
87
102
|
|
|
88
103
|
Install Kea2 by `pip`:
|
|
@@ -193,7 +208,7 @@ In Feature 3, a script is composed of three elements:
|
|
|
193
208
|
In a social media app, message sending is a common feature. On the message sending page, the `send` button should always appears when the input box is not empty (i.e., has some message).
|
|
194
209
|
|
|
195
210
|
<div align="center">
|
|
196
|
-
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
211
|
+
<img src="docs/images/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
197
212
|
</div>
|
|
198
213
|
|
|
199
214
|
<div align="center">
|
|
@@ -230,7 +245,55 @@ You can find the [user manual](docs/manual_en.md), which includes:
|
|
|
230
245
|
- How to run Kea2 and Kea2's command line options
|
|
231
246
|
- How to find and understand Kea2's testing results
|
|
232
247
|
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
233
|
-
- [
|
|
248
|
+
- [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
|
|
249
|
+
|
|
250
|
+
Some blogs on Kea/Kea2 (in Chinese):
|
|
251
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
|
|
252
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(二)](https://mp.weixin.qq.com/s/s4WkdstNcKupu9OP8jeOXw)
|
|
253
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(三)](https://mp.weixin.qq.com/s/BjXyo-xJRmPB_sCc4pmh8g)
|
|
254
|
+
- [2025 Let’s GoSSIP 软件安全暑期学校预告第一弹——Kea2](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
|
|
255
|
+
- [功能性质驱动的测试技术:下一代GUI自动化测试技术](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) --- 视频回放&PPT@MTSC 2025
|
|
256
|
+
|
|
257
|
+
工业界对Kea2的理解和评价(点击箭头查看详情):
|
|
258
|
+
|
|
259
|
+
<details>
|
|
260
|
+
<summary>Kea2的性质是什么含义?Kea2意义和价值是什么?</summary>
|
|
261
|
+
|
|
262
|
+
kea2 其实是一个工具,它是python+u2+fastbot的集合体。 它本身更像是一台装好了发动机和轮子的汽车底盘。
|
|
263
|
+
|
|
264
|
+
性质是苏老师他们团队提出的一个概念, 转换到测试领域的实际工作中,性质对应的是最小单位的功能(原子级功能),性质的依赖条件很少或没有,它可以自身运行。一个典型的性质就是登录,它仅仅具有输入用户名,输入密码,提交。再举个例子,给视频点个赞,也就是简单的两三步。就是一个性质。
|
|
265
|
+
|
|
266
|
+
性质与kea2结合的意义是在于解决过去使用appium过重的问题。用appium去测试一个性质通常要写很多行的代码,引导界面到达性质的位置。但使用kea2,就只需要编写性质,如何到其所在的位置是交给fastbot和它的学习算法来搞定的。
|
|
267
|
+
|
|
268
|
+
kea2另个重大的价值是,它解决了上述思想所需要的技术支撑,比appium更轻量的UI编写方式,fastbot编写性质的能力不足,以及无法编写逻辑和断言。整体上是保留了fastbot以往的优秀品质,完善了其不足和短板。
|
|
269
|
+
|
|
270
|
+
简而言之,需要做传统的编排型的功能测试,仍然使用appium,使用kea2也行,但你感觉不到它的价值。本身有需要做混沌测试,模糊测试,兼容性测试。那么强烈,强烈推荐kea2。kea2更偏探索性测试而非编排型。
|
|
271
|
+
</details>
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary>kea2组成是什么?kea2的核心作用?kea2做了什么?</summary>
|
|
275
|
+
|
|
276
|
+
kea2 组成:
|
|
277
|
+
|
|
278
|
+
fastbot -- fuzz测试引擎,负责跑路。
|
|
279
|
+
u2 -- 负责进行业务空间的操作。与使用selenium,appium,没什么区别。
|
|
280
|
+
python -- u2的操作,逻辑的编写,定制化的实现。
|
|
281
|
+
|
|
282
|
+
kea2的核心作用:
|
|
283
|
+
|
|
284
|
+
提供了条件触发器。 在FB跑路的时候,会不停遍历条件触发器,一旦触发,挂起FB,开始执行触发器指定的 ui test 及 assert。执行完毕,继续切回FB跑路。
|
|
285
|
+
|
|
286
|
+
hea2做了什么:
|
|
287
|
+
|
|
288
|
+
替换了FB的条件触发功能。
|
|
289
|
+
替换了FB的黑名单,黑控件功能。
|
|
290
|
+
替换了FB剪枝功能。
|
|
291
|
+
增加了多元化的元素空间操作能力。
|
|
292
|
+
增加了fuzz测试中的 逻辑设定。
|
|
293
|
+
增加了断言能力。
|
|
294
|
+
增加了元素操作能力。
|
|
295
|
+
</details>
|
|
296
|
+
|
|
234
297
|
|
|
235
298
|
## Open-source projects used by Kea2
|
|
236
299
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Kea2-python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
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: setuptools>=75.3.2
|
|
13
14
|
Dynamic: license-file
|
|
14
15
|
|
|
15
16
|
|
|
@@ -17,6 +18,7 @@ Dynamic: license-file
|
|
|
17
18
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
18
19
|
[](https://pepy.tech/projects/kea2-python)
|
|
19
20
|

|
|
21
|
+
[](https://deepwiki.com/ecnusse/Kea2)
|
|
20
22
|
|
|
21
23
|
<div>
|
|
22
24
|
<img src="https://github.com/user-attachments/assets/84e47b87-2dd2-4d7e-91d1-e8c1d1db0cf4" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
@@ -31,6 +33,13 @@ The group has reached its capacity. Please contact Xixian Liang at [xixian@stu.e
|
|
|
31
33
|
|
|
32
34
|
## About
|
|
33
35
|
|
|
36
|
+
<div align="center">
|
|
37
|
+
<img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
38
|
+
</div>
|
|
39
|
+
<div align="center">
|
|
40
|
+
<a href="https://en.wikipedia.org/wiki/Kea">Kea2's logo: A large parrot skilled in finding "bugs"</a>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
34
43
|
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*.
|
|
35
44
|
|
|
36
45
|
Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android), *an industrial-strength automated UI testing tool*, and [uiautomator2](https://github.com/openatx/uiautomator2), *an easy-to-use and stable Android automation library*.
|
|
@@ -40,7 +49,7 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
40
49
|
|
|
41
50
|
<div align="center">
|
|
42
51
|
<div style="max-width:80%; max-height:80%">
|
|
43
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
52
|
+
<img src="docs/images/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
44
53
|
</div>
|
|
45
54
|
</div>
|
|
46
55
|
|
|
@@ -60,11 +69,17 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
60
69
|
| **Finding crashes in deep states** | | :+1: | :+1: |
|
|
61
70
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
62
71
|
|
|
63
|
-
## Kea2's
|
|
72
|
+
## Kea2's Users
|
|
73
|
+
|
|
74
|
+
Kea2 (and its idea) has been used/integrated by
|
|
64
75
|
|
|
65
|
-
[OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app
|
|
76
|
+
- [OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app. OPay uses Kea2 for regression testing on POS machines and mobile devices.
|
|
66
77
|
|
|
67
|
-
|
|
78
|
+
- [WeChat's iExplorer]() --- WeChat's in-house testing platform
|
|
79
|
+
|
|
80
|
+
- [ByteDance's Fastbot](https://github.com/bytedance/Fastbot_Android)
|
|
81
|
+
|
|
82
|
+
Please let us know and willing to hear your feedback/questions if you are also using Kea2.
|
|
68
83
|
|
|
69
84
|
## Design & Roadmap
|
|
70
85
|
Kea2 currently works with:
|
|
@@ -82,7 +97,7 @@ In the future, Kea2 will be extended to support
|
|
|
82
97
|
|
|
83
98
|
Running environment:
|
|
84
99
|
- support Windows, MacOS and Linux
|
|
85
|
-
- python 3.8+, Android 5.0
|
|
100
|
+
- python 3.8+, Android 5.0~16.0 (Android SDK installed)
|
|
86
101
|
- **VPN closed** (Features 2 and 3 required)
|
|
87
102
|
|
|
88
103
|
Install Kea2 by `pip`:
|
|
@@ -193,7 +208,7 @@ In Feature 3, a script is composed of three elements:
|
|
|
193
208
|
In a social media app, message sending is a common feature. On the message sending page, the `send` button should always appears when the input box is not empty (i.e., has some message).
|
|
194
209
|
|
|
195
210
|
<div align="center">
|
|
196
|
-
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
211
|
+
<img src="docs/images/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
197
212
|
</div>
|
|
198
213
|
|
|
199
214
|
<div align="center">
|
|
@@ -230,7 +245,55 @@ You can find the [user manual](docs/manual_en.md), which includes:
|
|
|
230
245
|
- How to run Kea2 and Kea2's command line options
|
|
231
246
|
- How to find and understand Kea2's testing results
|
|
232
247
|
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
233
|
-
- [
|
|
248
|
+
- [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
|
|
249
|
+
|
|
250
|
+
Some blogs on Kea/Kea2 (in Chinese):
|
|
251
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
|
|
252
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(二)](https://mp.weixin.qq.com/s/s4WkdstNcKupu9OP8jeOXw)
|
|
253
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(三)](https://mp.weixin.qq.com/s/BjXyo-xJRmPB_sCc4pmh8g)
|
|
254
|
+
- [2025 Let’s GoSSIP 软件安全暑期学校预告第一弹——Kea2](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
|
|
255
|
+
- [功能性质驱动的测试技术:下一代GUI自动化测试技术](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) --- 视频回放&PPT@MTSC 2025
|
|
256
|
+
|
|
257
|
+
工业界对Kea2的理解和评价(点击箭头查看详情):
|
|
258
|
+
|
|
259
|
+
<details>
|
|
260
|
+
<summary>Kea2的性质是什么含义?Kea2意义和价值是什么?</summary>
|
|
261
|
+
|
|
262
|
+
kea2 其实是一个工具,它是python+u2+fastbot的集合体。 它本身更像是一台装好了发动机和轮子的汽车底盘。
|
|
263
|
+
|
|
264
|
+
性质是苏老师他们团队提出的一个概念, 转换到测试领域的实际工作中,性质对应的是最小单位的功能(原子级功能),性质的依赖条件很少或没有,它可以自身运行。一个典型的性质就是登录,它仅仅具有输入用户名,输入密码,提交。再举个例子,给视频点个赞,也就是简单的两三步。就是一个性质。
|
|
265
|
+
|
|
266
|
+
性质与kea2结合的意义是在于解决过去使用appium过重的问题。用appium去测试一个性质通常要写很多行的代码,引导界面到达性质的位置。但使用kea2,就只需要编写性质,如何到其所在的位置是交给fastbot和它的学习算法来搞定的。
|
|
267
|
+
|
|
268
|
+
kea2另个重大的价值是,它解决了上述思想所需要的技术支撑,比appium更轻量的UI编写方式,fastbot编写性质的能力不足,以及无法编写逻辑和断言。整体上是保留了fastbot以往的优秀品质,完善了其不足和短板。
|
|
269
|
+
|
|
270
|
+
简而言之,需要做传统的编排型的功能测试,仍然使用appium,使用kea2也行,但你感觉不到它的价值。本身有需要做混沌测试,模糊测试,兼容性测试。那么强烈,强烈推荐kea2。kea2更偏探索性测试而非编排型。
|
|
271
|
+
</details>
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary>kea2组成是什么?kea2的核心作用?kea2做了什么?</summary>
|
|
275
|
+
|
|
276
|
+
kea2 组成:
|
|
277
|
+
|
|
278
|
+
fastbot -- fuzz测试引擎,负责跑路。
|
|
279
|
+
u2 -- 负责进行业务空间的操作。与使用selenium,appium,没什么区别。
|
|
280
|
+
python -- u2的操作,逻辑的编写,定制化的实现。
|
|
281
|
+
|
|
282
|
+
kea2的核心作用:
|
|
283
|
+
|
|
284
|
+
提供了条件触发器。 在FB跑路的时候,会不停遍历条件触发器,一旦触发,挂起FB,开始执行触发器指定的 ui test 及 assert。执行完毕,继续切回FB跑路。
|
|
285
|
+
|
|
286
|
+
hea2做了什么:
|
|
287
|
+
|
|
288
|
+
替换了FB的条件触发功能。
|
|
289
|
+
替换了FB的黑名单,黑控件功能。
|
|
290
|
+
替换了FB剪枝功能。
|
|
291
|
+
增加了多元化的元素空间操作能力。
|
|
292
|
+
增加了fuzz测试中的 逻辑设定。
|
|
293
|
+
增加了断言能力。
|
|
294
|
+
增加了元素操作能力。
|
|
295
|
+
</details>
|
|
296
|
+
|
|
234
297
|
|
|
235
298
|
## Open-source projects used by Kea2
|
|
236
299
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
4
4
|
[](https://pepy.tech/projects/kea2-python)
|
|
5
5
|

|
|
6
|
+
[](https://deepwiki.com/ecnusse/Kea2)
|
|
6
7
|
|
|
7
8
|
<div>
|
|
8
9
|
<img src="https://github.com/user-attachments/assets/84e47b87-2dd2-4d7e-91d1-e8c1d1db0cf4" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
@@ -17,6 +18,13 @@ The group has reached its capacity. Please contact Xixian Liang at [xixian@stu.e
|
|
|
17
18
|
|
|
18
19
|
## About
|
|
19
20
|
|
|
21
|
+
<div align="center">
|
|
22
|
+
<img src="docs/images/kea2_logo.png" alt="kea_logo" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
23
|
+
</div>
|
|
24
|
+
<div align="center">
|
|
25
|
+
<a href="https://en.wikipedia.org/wiki/Kea">Kea2's logo: A large parrot skilled in finding "bugs"</a>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
20
28
|
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*.
|
|
21
29
|
|
|
22
30
|
Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android), *an industrial-strength automated UI testing tool*, and [uiautomator2](https://github.com/openatx/uiautomator2), *an easy-to-use and stable Android automation library*.
|
|
@@ -26,7 +34,7 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
26
34
|
|
|
27
35
|
<div align="center">
|
|
28
36
|
<div style="max-width:80%; max-height:80%">
|
|
29
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
37
|
+
<img src="docs/images/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
30
38
|
</div>
|
|
31
39
|
</div>
|
|
32
40
|
|
|
@@ -46,11 +54,17 @@ Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operatin
|
|
|
46
54
|
| **Finding crashes in deep states** | | :+1: | :+1: |
|
|
47
55
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
48
56
|
|
|
49
|
-
## Kea2's
|
|
57
|
+
## Kea2's Users
|
|
58
|
+
|
|
59
|
+
Kea2 (and its idea) has been used/integrated by
|
|
50
60
|
|
|
51
|
-
[OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app
|
|
61
|
+
- [OPay Business](https://play.google.com/store/apps/details?id=team.opay.pay.merchant.service) --- a financial & payment app. OPay uses Kea2 for regression testing on POS machines and mobile devices.
|
|
52
62
|
|
|
53
|
-
|
|
63
|
+
- [WeChat's iExplorer]() --- WeChat's in-house testing platform
|
|
64
|
+
|
|
65
|
+
- [ByteDance's Fastbot](https://github.com/bytedance/Fastbot_Android)
|
|
66
|
+
|
|
67
|
+
Please let us know and willing to hear your feedback/questions if you are also using Kea2.
|
|
54
68
|
|
|
55
69
|
## Design & Roadmap
|
|
56
70
|
Kea2 currently works with:
|
|
@@ -68,7 +82,7 @@ In the future, Kea2 will be extended to support
|
|
|
68
82
|
|
|
69
83
|
Running environment:
|
|
70
84
|
- support Windows, MacOS and Linux
|
|
71
|
-
- python 3.8+, Android 5.0
|
|
85
|
+
- python 3.8+, Android 5.0~16.0 (Android SDK installed)
|
|
72
86
|
- **VPN closed** (Features 2 and 3 required)
|
|
73
87
|
|
|
74
88
|
Install Kea2 by `pip`:
|
|
@@ -179,7 +193,7 @@ In Feature 3, a script is composed of three elements:
|
|
|
179
193
|
In a social media app, message sending is a common feature. On the message sending page, the `send` button should always appears when the input box is not empty (i.e., has some message).
|
|
180
194
|
|
|
181
195
|
<div align="center">
|
|
182
|
-
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
196
|
+
<img src="docs/images/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
183
197
|
</div>
|
|
184
198
|
|
|
185
199
|
<div align="center">
|
|
@@ -216,7 +230,55 @@ You can find the [user manual](docs/manual_en.md), which includes:
|
|
|
216
230
|
- How to run Kea2 and Kea2's command line options
|
|
217
231
|
- How to find and understand Kea2's testing results
|
|
218
232
|
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
219
|
-
- [
|
|
233
|
+
- [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
|
|
234
|
+
|
|
235
|
+
Some blogs on Kea/Kea2 (in Chinese):
|
|
236
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
|
|
237
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(二)](https://mp.weixin.qq.com/s/s4WkdstNcKupu9OP8jeOXw)
|
|
238
|
+
- [别再苦哈哈写测试脚本了,生成它们吧!(三)](https://mp.weixin.qq.com/s/BjXyo-xJRmPB_sCc4pmh8g)
|
|
239
|
+
- [2025 Let’s GoSSIP 软件安全暑期学校预告第一弹——Kea2](https://mp.weixin.qq.com/s/8_0_GNNin8E5BqTbJU33wg)
|
|
240
|
+
- [功能性质驱动的测试技术:下一代GUI自动化测试技术](https://appw8oh6ysg4044.xet.citv.cn/p/course/video/v_6882fa14e4b0694ca0ec0a1b) --- 视频回放&PPT@MTSC 2025
|
|
241
|
+
|
|
242
|
+
工业界对Kea2的理解和评价(点击箭头查看详情):
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary>Kea2的性质是什么含义?Kea2意义和价值是什么?</summary>
|
|
246
|
+
|
|
247
|
+
kea2 其实是一个工具,它是python+u2+fastbot的集合体。 它本身更像是一台装好了发动机和轮子的汽车底盘。
|
|
248
|
+
|
|
249
|
+
性质是苏老师他们团队提出的一个概念, 转换到测试领域的实际工作中,性质对应的是最小单位的功能(原子级功能),性质的依赖条件很少或没有,它可以自身运行。一个典型的性质就是登录,它仅仅具有输入用户名,输入密码,提交。再举个例子,给视频点个赞,也就是简单的两三步。就是一个性质。
|
|
250
|
+
|
|
251
|
+
性质与kea2结合的意义是在于解决过去使用appium过重的问题。用appium去测试一个性质通常要写很多行的代码,引导界面到达性质的位置。但使用kea2,就只需要编写性质,如何到其所在的位置是交给fastbot和它的学习算法来搞定的。
|
|
252
|
+
|
|
253
|
+
kea2另个重大的价值是,它解决了上述思想所需要的技术支撑,比appium更轻量的UI编写方式,fastbot编写性质的能力不足,以及无法编写逻辑和断言。整体上是保留了fastbot以往的优秀品质,完善了其不足和短板。
|
|
254
|
+
|
|
255
|
+
简而言之,需要做传统的编排型的功能测试,仍然使用appium,使用kea2也行,但你感觉不到它的价值。本身有需要做混沌测试,模糊测试,兼容性测试。那么强烈,强烈推荐kea2。kea2更偏探索性测试而非编排型。
|
|
256
|
+
</details>
|
|
257
|
+
|
|
258
|
+
<details>
|
|
259
|
+
<summary>kea2组成是什么?kea2的核心作用?kea2做了什么?</summary>
|
|
260
|
+
|
|
261
|
+
kea2 组成:
|
|
262
|
+
|
|
263
|
+
fastbot -- fuzz测试引擎,负责跑路。
|
|
264
|
+
u2 -- 负责进行业务空间的操作。与使用selenium,appium,没什么区别。
|
|
265
|
+
python -- u2的操作,逻辑的编写,定制化的实现。
|
|
266
|
+
|
|
267
|
+
kea2的核心作用:
|
|
268
|
+
|
|
269
|
+
提供了条件触发器。 在FB跑路的时候,会不停遍历条件触发器,一旦触发,挂起FB,开始执行触发器指定的 ui test 及 assert。执行完毕,继续切回FB跑路。
|
|
270
|
+
|
|
271
|
+
hea2做了什么:
|
|
272
|
+
|
|
273
|
+
替换了FB的条件触发功能。
|
|
274
|
+
替换了FB的黑名单,黑控件功能。
|
|
275
|
+
替换了FB剪枝功能。
|
|
276
|
+
增加了多元化的元素空间操作能力。
|
|
277
|
+
增加了fuzz测试中的 逻辑设定。
|
|
278
|
+
增加了断言能力。
|
|
279
|
+
增加了元素操作能力。
|
|
280
|
+
</details>
|
|
281
|
+
|
|
220
282
|
|
|
221
283
|
## Open-source projects used by Kea2
|
|
222
284
|
|
|
@@ -9,7 +9,7 @@ from concurrent.futures import ThreadPoolExecutor
|
|
|
9
9
|
|
|
10
10
|
from PIL import Image, ImageDraw, ImageFont
|
|
11
11
|
from jinja2 import Environment, FileSystemLoader, select_autoescape, PackageLoader
|
|
12
|
-
from kea2.utils import getLogger
|
|
12
|
+
from kea2.utils import getLogger, catchException
|
|
13
13
|
|
|
14
14
|
logger = getLogger(__name__)
|
|
15
15
|
|
|
@@ -421,27 +421,24 @@ class BugReportGenerator:
|
|
|
421
421
|
step_data["Info"] = json.loads(step_data["Info"])
|
|
422
422
|
return step_data
|
|
423
423
|
|
|
424
|
+
@catchException("Error when marking screenshot")
|
|
424
425
|
def _mark_screenshot(self, step_data: StepData):
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
return
|
|
430
|
-
|
|
431
|
-
if step_type == "Monkey":
|
|
432
|
-
act = step_data["Info"].get("act")
|
|
433
|
-
pos = step_data["Info"].get("pos")
|
|
434
|
-
if act in ["CLICK", "LONG_CLICK"] or act.startswith("SCROLL"):
|
|
435
|
-
self._mark_screenshot_interaction(step_type, screenshot_name, act, pos)
|
|
436
|
-
|
|
437
|
-
elif step_type == "Script":
|
|
438
|
-
act = step_data["Info"].get("method")
|
|
439
|
-
pos = step_data["Info"].get("params")
|
|
440
|
-
if act in ["click", "setText", "swipe"]:
|
|
441
|
-
self._mark_screenshot_interaction(step_type, screenshot_name, act, pos)
|
|
426
|
+
step_type = step_data["Type"]
|
|
427
|
+
screenshot_name = step_data["Screenshot"]
|
|
428
|
+
if not screenshot_name:
|
|
429
|
+
return
|
|
442
430
|
|
|
443
|
-
|
|
444
|
-
|
|
431
|
+
if step_type == "Monkey":
|
|
432
|
+
act = step_data["Info"].get("act")
|
|
433
|
+
pos = step_data["Info"].get("pos")
|
|
434
|
+
if act in ["CLICK", "LONG_CLICK"] or act.startswith("SCROLL"):
|
|
435
|
+
self._mark_screenshot_interaction(step_type, screenshot_name, act, pos)
|
|
436
|
+
|
|
437
|
+
elif step_type == "Script":
|
|
438
|
+
act = step_data["Info"].get("method")
|
|
439
|
+
pos = step_data["Info"].get("params")
|
|
440
|
+
if act in ["click", "setText", "swipe"]:
|
|
441
|
+
self._mark_screenshot_interaction(step_type, screenshot_name, act, pos)
|
|
445
442
|
|
|
446
443
|
|
|
447
444
|
def _mark_screenshot_interaction(self, step_type: str, screenshot_name: str, action_type: str, position: Union[List, Tuple]) -> bool:
|
|
@@ -528,65 +525,61 @@ class BugReportGenerator:
|
|
|
528
525
|
img.save(screenshot_path)
|
|
529
526
|
return True
|
|
530
527
|
|
|
528
|
+
@catchException("Error rendering template")
|
|
531
529
|
def _generate_html_report(self, data: ReportData):
|
|
532
530
|
"""
|
|
533
531
|
Generate HTML format bug report
|
|
534
532
|
"""
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
# Check if template exists, if not create it
|
|
577
|
-
template_path = Path(__file__).parent / "templates" / "bug_report_template.html"
|
|
578
|
-
if not template_path.exists():
|
|
579
|
-
logger.warning("Template file does not exist, creating default template...")
|
|
533
|
+
# Format timestamp for display
|
|
534
|
+
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
535
|
+
|
|
536
|
+
# Ensure coverage_trend has data
|
|
537
|
+
if not data["coverage_trend"]:
|
|
538
|
+
logger.warning("No coverage trend data")
|
|
539
|
+
# Use the same field names as in coverage.log file
|
|
540
|
+
data["coverage_trend"] = [{"stepsCount": 0, "coverage": 0, "testedActivitiesCount": 0}]
|
|
541
|
+
|
|
542
|
+
# Convert coverage_trend to JSON string, ensuring all data points are included
|
|
543
|
+
coverage_trend_json = json.dumps(data["coverage_trend"])
|
|
544
|
+
logger.debug(f"Number of coverage trend data points: {len(data['coverage_trend'])}")
|
|
545
|
+
|
|
546
|
+
# Prepare template data
|
|
547
|
+
template_data = {
|
|
548
|
+
'timestamp': timestamp,
|
|
549
|
+
'bugs_found': data["bugs_found"],
|
|
550
|
+
'total_testing_time': data["total_testing_time"],
|
|
551
|
+
'executed_events': data["executed_events"],
|
|
552
|
+
'coverage_percent': round(data["coverage"], 2),
|
|
553
|
+
'total_activities_count': data["total_activities_count"],
|
|
554
|
+
'tested_activities_count': data["tested_activities_count"],
|
|
555
|
+
'tested_activities': data["tested_activities"],
|
|
556
|
+
'total_activities': data["total_activities"],
|
|
557
|
+
'all_properties_count': data["all_properties_count"],
|
|
558
|
+
'executed_properties_count': data["executed_properties_count"],
|
|
559
|
+
'items_per_page': 10, # Items to display per page
|
|
560
|
+
'screenshots': self.screenshots,
|
|
561
|
+
'property_violations': data["property_violations"],
|
|
562
|
+
'property_stats': data["property_stats"],
|
|
563
|
+
'property_error_details': data["property_error_details"],
|
|
564
|
+
'coverage_data': coverage_trend_json,
|
|
565
|
+
'take_screenshots': self.take_screenshots, # Pass screenshot setting to template
|
|
566
|
+
'property_execution_trend': data["property_execution_trend"],
|
|
567
|
+
'property_execution_data': json.dumps(data["property_execution_trend"]),
|
|
568
|
+
'activity_count_history': data["activity_count_history"],
|
|
569
|
+
'crash_events': data["crash_events"],
|
|
570
|
+
'anr_events': data["anr_events"]
|
|
571
|
+
}
|
|
580
572
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
573
|
+
# Check if template exists, if not create it
|
|
574
|
+
template_path = Path(__file__).parent / "templates" / "bug_report_template.html"
|
|
575
|
+
if not template_path.exists():
|
|
576
|
+
logger.warning("Template file does not exist, creating default template...")
|
|
584
577
|
|
|
585
|
-
|
|
578
|
+
# Use Jinja2 to render template
|
|
579
|
+
template = self.jinja_env.get_template("bug_report_template.html")
|
|
580
|
+
html_content = template.render(**template_data)
|
|
586
581
|
|
|
587
|
-
|
|
588
|
-
logger.error(f"Error rendering template: {e}")
|
|
589
|
-
raise
|
|
582
|
+
return html_content
|
|
590
583
|
|
|
591
584
|
def _add_screenshot_info(self, step_data: StepData, step_index: int, data: Dict):
|
|
592
585
|
"""
|
|
@@ -697,9 +690,7 @@ class BugReportGenerator:
|
|
|
697
690
|
data["property_violations"].append({
|
|
698
691
|
"index": index,
|
|
699
692
|
"property_name": property_name,
|
|
700
|
-
"
|
|
701
|
-
"interaction_pages": [start_step, end_step],
|
|
702
|
-
"postcondition_page": end_step
|
|
693
|
+
"interaction_pages": [start_step, end_step]
|
|
703
694
|
})
|
|
704
695
|
index += 1
|
|
705
696
|
|
|
@@ -3,7 +3,7 @@ from retry.api import retry_call
|
|
|
3
3
|
from dataclasses import asdict
|
|
4
4
|
import requests
|
|
5
5
|
from time import sleep
|
|
6
|
-
|
|
6
|
+
from pkg_resources import parse_version
|
|
7
7
|
|
|
8
8
|
from uiautomator2.core import HTTPResponse, _http_request
|
|
9
9
|
from kea2.adbUtils import ADBDevice, ADBStreamShell_V2
|
|
@@ -28,6 +28,7 @@ class FastbotManager:
|
|
|
28
28
|
self._device_output_dir = None
|
|
29
29
|
ADBDevice.setDevice(options.serial, options.transport_id)
|
|
30
30
|
self.dev = ADBDevice()
|
|
31
|
+
self.android_release = parse_version(self.dev.getprop("ro.build.version.release"))
|
|
31
32
|
|
|
32
33
|
def _activateFastbot(self) -> ADBStreamShell_V2:
|
|
33
34
|
"""
|
|
@@ -219,7 +220,7 @@ class FastbotManager:
|
|
|
219
220
|
if self.thread.is_running():
|
|
220
221
|
logger.info("Waiting for Fastbot to exit.")
|
|
221
222
|
return self.thread.wait()
|
|
222
|
-
return self.thread.poll()
|
|
223
|
+
return self.thread.poll() if self.android_release >= parse_version("7.0") else 0
|
|
223
224
|
|
|
224
225
|
def start(self):
|
|
225
226
|
# kill the fastbot process if runing.
|