Kea2-python 0.1.2__tar.gz → 0.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.
Potentially problematic release.
This version of Kea2-python might be problematic. Click here for more details.
- {kea2_python-0.1.2 → kea2_python-0.2.0/Kea2_python.egg-info}/PKG-INFO +44 -33
- {kea2_python-0.1.2 → kea2_python-0.2.0}/Kea2_python.egg-info/SOURCES.txt +2 -1
- kea2_python-0.2.0/Kea2_python.egg-info/requires.txt +4 -0
- kea2_python-0.1.2/README.md → kea2_python-0.2.0/PKG-INFO +55 -31
- kea2_python-0.1.2/Kea2_python.egg-info/PKG-INFO → kea2_python-0.2.0/README.md +41 -44
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/absDriver.py +1 -1
- kea2_python-0.2.0/kea2/adbUtils.py +543 -0
- kea2_python-0.2.0/kea2/bug_report_generator.py +491 -0
- kea2_python-0.2.0/kea2/fastbotManager.py +213 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/keaUtils.py +100 -95
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/kea_launcher.py +15 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/resultSyncer.py +18 -8
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/templates/bug_report_template.html +9 -50
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/u2Driver.py +148 -137
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/utils.py +1 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/pyproject.toml +3 -2
- kea2_python-0.2.0/tests/test_u2Selector.py +200 -0
- kea2_python-0.1.2/Kea2_python.egg-info/requires.txt +0 -3
- kea2_python-0.1.2/kea2/adbUtils.py +0 -290
- kea2_python-0.1.2/kea2/bug_report_generator.py +0 -479
- kea2_python-0.1.2/kea2/fastbotManager.py +0 -155
- {kea2_python-0.1.2 → kea2_python-0.2.0}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/LICENSE +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/__init__.py +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/widget.block.py +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/framework.jar +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/kea2-thirdpart.jar +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/assets/quicktest.py +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/cli.py +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/kea2/logWatcher.py +0 -0
- {kea2_python-0.1.2 → kea2_python-0.2.0}/setup.cfg +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Kea2-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Dist: rtree>=1.3.0
|
|
10
|
-
Requires-Dist: uiautomator2>=3.2.9
|
|
11
10
|
Requires-Dist: jinja2>=3.0.0
|
|
11
|
+
Requires-Dist: uiautomator2>=3.3.3
|
|
12
|
+
Requires-Dist: adbutils>=2.9.3
|
|
12
13
|
Dynamic: license-file
|
|
13
14
|
|
|
14
15
|
|
|
@@ -17,25 +18,41 @@ Dynamic: license-file
|
|
|
17
18
|
[](https://pepy.tech/projects/kea2-python)
|
|
18
19
|

|
|
19
20
|
|
|
21
|
+
|
|
20
22
|
<div>
|
|
21
|
-
<img src="https://github.com/user-attachments/assets/
|
|
23
|
+
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
22
24
|
</div>
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
### Github repo link
|
|
27
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
28
|
+
|
|
29
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
30
|
+
|
|
31
|
+
## About
|
|
25
32
|
|
|
26
|
-
Kea2 is an easy-to-use
|
|
33
|
+
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*.
|
|
27
34
|
|
|
28
|
-
Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2) and
|
|
35
|
+
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*.
|
|
36
|
+
Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
|
|
37
|
+
|
|
38
|
+
## Novelty & Important features
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
<div style="max-width:80%; max-height:80%">
|
|
42
|
+
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
29
45
|
|
|
30
|
-
## Important features
|
|
31
46
|
- **Feature 1**(查找稳定性问题): coming with the full capability of [Fastbot](https://github.com/bytedance/Fastbot_Android) for stress testing and finding *stability problems* (i.e., *crashing bugs*);
|
|
32
47
|
|
|
33
48
|
- **Feature 2**(自定义测试场景\事件序列\黑白名单\黑白控件[^1]): customizing testing scenarios when running Fastbot (e.g., testing specific app functionalities, executing specific event traces, entering specifc UI pages, reaching specific app states, blacklisting specific activities/UI widgets/UI regions) with the full capability and flexibility powered by *python* language and [uiautomator2](https://github.com/openatx/uiautomator2);
|
|
34
49
|
|
|
35
|
-
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing bugs*)
|
|
50
|
+
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing functional bugs*).
|
|
36
51
|
|
|
52
|
+
For **Feature 2 and 3**, Kea2 allows you to focus on what app functionalities to be tested. You do not need to worry about how to reach these app functionalities. Just let Fastbot help. As a result, your scripts are usually short, robust and easy to maintain, and the corresponding app functionalities are much more stress-tested!
|
|
37
53
|
|
|
38
54
|
**The ability of the three features in Kea2**
|
|
55
|
+
|
|
39
56
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
40
57
|
| --- | --- | --- | ---- |
|
|
41
58
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -43,24 +60,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
43
60
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
44
61
|
|
|
45
62
|
|
|
46
|
-
<div align="center">
|
|
47
|
-
<div style="max-width:80%; max-height:80%">
|
|
48
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
63
|
|
|
54
64
|
## Design & Roadmap
|
|
55
|
-
Kea2
|
|
56
|
-
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework;
|
|
65
|
+
Kea2 currently works with:
|
|
66
|
+
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
|
|
57
67
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
58
68
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
59
69
|
|
|
60
70
|
In the future, Kea2 will be extended to support
|
|
61
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
62
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
63
|
-
- other automated UI testing tools (not limited to Fastbot)
|
|
71
|
+
- [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
|
|
72
|
+
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
|
|
73
|
+
- any other automated UI testing tools (not limited to Fastbot)
|
|
64
74
|
|
|
65
75
|
|
|
66
76
|
## Installation
|
|
@@ -114,7 +124,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
114
124
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
115
125
|
```
|
|
116
126
|
|
|
117
|
-
|
|
127
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
118
128
|
|
|
119
129
|
> 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).
|
|
120
130
|
|
|
@@ -177,13 +187,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
177
187
|
|
|
178
188
|
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).
|
|
179
189
|
|
|
180
|
-
<div align="center"
|
|
181
|
-
<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
<div align="center">
|
|
191
|
+
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div align="center">
|
|
195
|
+
The expected behavior (the upper figure) and the buggy behavior (the lower figure).
|
|
186
196
|
</div>
|
|
197
|
+
|
|
187
198
|
|
|
188
199
|
For the preceding always-holding property, we can write the following script to validate the functional correctness: when there is an `input_box` widget on the message sending page, we can type any non-empty string text into the input box and assert `send_button` should always exists.
|
|
189
200
|
|
|
@@ -208,12 +219,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
208
219
|
|
|
209
220
|
## Documentations(更多文档)
|
|
210
221
|
|
|
211
|
-
[
|
|
212
|
-
- Kea2
|
|
213
|
-
- Kea2
|
|
214
|
-
- Kea2
|
|
215
|
-
-
|
|
216
|
-
- [
|
|
222
|
+
You can find the [user manual](docs/manual_en.md), which includes:
|
|
223
|
+
- Examples of using Kea2 on WeChat (in Chinese);
|
|
224
|
+
- How to define Kea2's scripts and use the decorators (e.g., `@precondition`、`@prob`、`@max_tries`);
|
|
225
|
+
- How to run Kea2 and Kea2's command line options
|
|
226
|
+
- How to find and understand Kea2's testing results
|
|
227
|
+
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
217
228
|
|
|
218
229
|
## Open-source projects used by Kea2
|
|
219
230
|
|
|
@@ -36,4 +36,5 @@ kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so
|
|
|
36
36
|
kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so
|
|
37
37
|
kea2/assets/fastbot_libs/x86/libfastbot_native.so
|
|
38
38
|
kea2/assets/fastbot_libs/x86_64/libfastbot_native.so
|
|
39
|
-
kea2/templates/bug_report_template.html
|
|
39
|
+
kea2/templates/bug_report_template.html
|
|
40
|
+
tests/test_u2Selector.py
|
|
@@ -1,28 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Kea2-python
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A python library for supporting and customizing automated UI testing for mobile apps
|
|
5
|
+
Author-email: Xixian Liang <xixian@stu.ecnu.edu.cn>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: rtree>=1.3.0
|
|
10
|
+
Requires-Dist: jinja2>=3.0.0
|
|
11
|
+
Requires-Dist: uiautomator2>=3.3.3
|
|
12
|
+
Requires-Dist: adbutils>=2.9.3
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
1
15
|
|
|
2
16
|
|
|
3
17
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
4
18
|
[](https://pepy.tech/projects/kea2-python)
|
|
5
19
|

|
|
6
20
|
|
|
21
|
+
|
|
7
22
|
<div>
|
|
8
|
-
<img src="https://github.com/user-attachments/assets/
|
|
23
|
+
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
9
24
|
</div>
|
|
10
25
|
|
|
11
|
-
|
|
26
|
+
### Github repo link
|
|
27
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
28
|
+
|
|
29
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
30
|
+
|
|
31
|
+
## About
|
|
32
|
+
|
|
33
|
+
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*.
|
|
34
|
+
|
|
35
|
+
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*.
|
|
36
|
+
Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
|
|
12
37
|
|
|
13
|
-
|
|
38
|
+
## Novelty & Important features
|
|
14
39
|
|
|
15
|
-
|
|
40
|
+
<div align="center">
|
|
41
|
+
<div style="max-width:80%; max-height:80%">
|
|
42
|
+
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
16
45
|
|
|
17
|
-
## Important features
|
|
18
46
|
- **Feature 1**(查找稳定性问题): coming with the full capability of [Fastbot](https://github.com/bytedance/Fastbot_Android) for stress testing and finding *stability problems* (i.e., *crashing bugs*);
|
|
19
47
|
|
|
20
48
|
- **Feature 2**(自定义测试场景\事件序列\黑白名单\黑白控件[^1]): customizing testing scenarios when running Fastbot (e.g., testing specific app functionalities, executing specific event traces, entering specifc UI pages, reaching specific app states, blacklisting specific activities/UI widgets/UI regions) with the full capability and flexibility powered by *python* language and [uiautomator2](https://github.com/openatx/uiautomator2);
|
|
21
49
|
|
|
22
|
-
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing bugs*)
|
|
50
|
+
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing functional bugs*).
|
|
23
51
|
|
|
52
|
+
For **Feature 2 and 3**, Kea2 allows you to focus on what app functionalities to be tested. You do not need to worry about how to reach these app functionalities. Just let Fastbot help. As a result, your scripts are usually short, robust and easy to maintain, and the corresponding app functionalities are much more stress-tested!
|
|
24
53
|
|
|
25
54
|
**The ability of the three features in Kea2**
|
|
55
|
+
|
|
26
56
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
27
57
|
| --- | --- | --- | ---- |
|
|
28
58
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -30,24 +60,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
30
60
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
31
61
|
|
|
32
62
|
|
|
33
|
-
<div align="center">
|
|
34
|
-
<div style="max-width:80%; max-height:80%">
|
|
35
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
|
|
40
63
|
|
|
41
64
|
## Design & Roadmap
|
|
42
|
-
Kea2
|
|
43
|
-
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework;
|
|
65
|
+
Kea2 currently works with:
|
|
66
|
+
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
|
|
44
67
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
45
68
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
46
69
|
|
|
47
70
|
In the future, Kea2 will be extended to support
|
|
48
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
49
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
50
|
-
- other automated UI testing tools (not limited to Fastbot)
|
|
71
|
+
- [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
|
|
72
|
+
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
|
|
73
|
+
- any other automated UI testing tools (not limited to Fastbot)
|
|
51
74
|
|
|
52
75
|
|
|
53
76
|
## Installation
|
|
@@ -101,7 +124,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
101
124
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
102
125
|
```
|
|
103
126
|
|
|
104
|
-
|
|
127
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
105
128
|
|
|
106
129
|
> 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).
|
|
107
130
|
|
|
@@ -164,13 +187,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
164
187
|
|
|
165
188
|
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).
|
|
166
189
|
|
|
167
|
-
<div align="center"
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
190
|
+
<div align="center">
|
|
191
|
+
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div align="center">
|
|
195
|
+
The expected behavior (the upper figure) and the buggy behavior (the lower figure).
|
|
173
196
|
</div>
|
|
197
|
+
|
|
174
198
|
|
|
175
199
|
For the preceding always-holding property, we can write the following script to validate the functional correctness: when there is an `input_box` widget on the message sending page, we can type any non-empty string text into the input box and assert `send_button` should always exists.
|
|
176
200
|
|
|
@@ -195,12 +219,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
195
219
|
|
|
196
220
|
## Documentations(更多文档)
|
|
197
221
|
|
|
198
|
-
[
|
|
199
|
-
- Kea2
|
|
200
|
-
- Kea2
|
|
201
|
-
- Kea2
|
|
202
|
-
-
|
|
203
|
-
- [
|
|
222
|
+
You can find the [user manual](docs/manual_en.md), which includes:
|
|
223
|
+
- Examples of using Kea2 on WeChat (in Chinese);
|
|
224
|
+
- How to define Kea2's scripts and use the decorators (e.g., `@precondition`、`@prob`、`@max_tries`);
|
|
225
|
+
- How to run Kea2 and Kea2's command line options
|
|
226
|
+
- How to find and understand Kea2's testing results
|
|
227
|
+
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
204
228
|
|
|
205
229
|
## Open-source projects used by Kea2
|
|
206
230
|
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Kea2-python
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: A python library for supporting and customizing automated UI testing for mobile apps
|
|
5
|
-
Author-email: Xixian Liang <xixian@stu.ecnu.edu.cn>
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Requires-Dist: rtree>=1.3.0
|
|
10
|
-
Requires-Dist: uiautomator2>=3.2.9
|
|
11
|
-
Requires-Dist: jinja2>=3.0.0
|
|
12
|
-
Dynamic: license-file
|
|
13
|
-
|
|
14
1
|
|
|
15
2
|
|
|
16
3
|
[](https://pypi.python.org/pypi/kea2-python)
|
|
17
4
|
[](https://pepy.tech/projects/kea2-python)
|
|
18
5
|

|
|
19
6
|
|
|
7
|
+
|
|
20
8
|
<div>
|
|
21
|
-
<img src="https://github.com/user-attachments/assets/
|
|
9
|
+
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
22
10
|
</div>
|
|
23
11
|
|
|
24
|
-
|
|
12
|
+
### Github repo link
|
|
13
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
14
|
+
|
|
15
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
16
|
+
|
|
17
|
+
## About
|
|
18
|
+
|
|
19
|
+
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*.
|
|
20
|
+
|
|
21
|
+
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*.
|
|
22
|
+
Kea2 currently targets [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
## Novelty & Important features
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
<div align="center">
|
|
27
|
+
<div style="max-width:80%; max-height:80%">
|
|
28
|
+
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
29
31
|
|
|
30
|
-
## Important features
|
|
31
32
|
- **Feature 1**(查找稳定性问题): coming with the full capability of [Fastbot](https://github.com/bytedance/Fastbot_Android) for stress testing and finding *stability problems* (i.e., *crashing bugs*);
|
|
32
33
|
|
|
33
34
|
- **Feature 2**(自定义测试场景\事件序列\黑白名单\黑白控件[^1]): customizing testing scenarios when running Fastbot (e.g., testing specific app functionalities, executing specific event traces, entering specifc UI pages, reaching specific app states, blacklisting specific activities/UI widgets/UI regions) with the full capability and flexibility powered by *python* language and [uiautomator2](https://github.com/openatx/uiautomator2);
|
|
34
35
|
|
|
35
|
-
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing bugs*)
|
|
36
|
+
- **Feature 3**(支持断言机制[^2]): supporting auto-assertions when running Fastbot, based on the idea of [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea), for finding *logic bugs* (i.e., *non-crashing functional bugs*).
|
|
36
37
|
|
|
38
|
+
For **Feature 2 and 3**, Kea2 allows you to focus on what app functionalities to be tested. You do not need to worry about how to reach these app functionalities. Just let Fastbot help. As a result, your scripts are usually short, robust and easy to maintain, and the corresponding app functionalities are much more stress-tested!
|
|
37
39
|
|
|
38
40
|
**The ability of the three features in Kea2**
|
|
41
|
+
|
|
39
42
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
40
43
|
| --- | --- | --- | ---- |
|
|
41
44
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -43,24 +46,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
43
46
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
44
47
|
|
|
45
48
|
|
|
46
|
-
<div align="center">
|
|
47
|
-
<div style="max-width:80%; max-height:80%">
|
|
48
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
49
|
|
|
54
50
|
## Design & Roadmap
|
|
55
|
-
Kea2
|
|
56
|
-
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework;
|
|
51
|
+
Kea2 currently works with:
|
|
52
|
+
- [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework to manage the scripts;
|
|
57
53
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
58
54
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
59
55
|
|
|
60
56
|
In the future, Kea2 will be extended to support
|
|
61
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
62
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
63
|
-
- other automated UI testing tools (not limited to Fastbot)
|
|
57
|
+
- [pytest](https://docs.pytest.org/en/stable/), another popular python testing framework;
|
|
58
|
+
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony);
|
|
59
|
+
- any other automated UI testing tools (not limited to Fastbot)
|
|
64
60
|
|
|
65
61
|
|
|
66
62
|
## Installation
|
|
@@ -114,7 +110,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
114
110
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
115
111
|
```
|
|
116
112
|
|
|
117
|
-
|
|
113
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
118
114
|
|
|
119
115
|
> 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).
|
|
120
116
|
|
|
@@ -177,13 +173,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
177
173
|
|
|
178
174
|
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).
|
|
179
175
|
|
|
180
|
-
<div align="center"
|
|
181
|
-
<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
176
|
+
<div align="center">
|
|
177
|
+
<img src="docs/socialAppBug.png" style="border-radius: 14px; width:30%; height:40%;"/>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div align="center">
|
|
181
|
+
The expected behavior (the upper figure) and the buggy behavior (the lower figure).
|
|
186
182
|
</div>
|
|
183
|
+
|
|
187
184
|
|
|
188
185
|
For the preceding always-holding property, we can write the following script to validate the functional correctness: when there is an `input_box` widget on the message sending page, we can type any non-empty string text into the input box and assert `send_button` should always exists.
|
|
189
186
|
|
|
@@ -208,12 +205,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
208
205
|
|
|
209
206
|
## Documentations(更多文档)
|
|
210
207
|
|
|
211
|
-
[
|
|
212
|
-
- Kea2
|
|
213
|
-
- Kea2
|
|
214
|
-
- Kea2
|
|
215
|
-
-
|
|
216
|
-
- [
|
|
208
|
+
You can find the [user manual](docs/manual_en.md), which includes:
|
|
209
|
+
- Examples of using Kea2 on WeChat (in Chinese);
|
|
210
|
+
- How to define Kea2's scripts and use the decorators (e.g., `@precondition`、`@prob`、`@max_tries`);
|
|
211
|
+
- How to run Kea2 and Kea2's command line options
|
|
212
|
+
- How to find and understand Kea2's testing results
|
|
213
|
+
- How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
|
|
217
214
|
|
|
218
215
|
## Open-source projects used by Kea2
|
|
219
216
|
|