Kea2-python 0.1.3__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.3 → kea2_python-0.2.0/Kea2_python.egg-info}/PKG-INFO +42 -32
- kea2_python-0.2.0/Kea2_python.egg-info/requires.txt +4 -0
- kea2_python-0.1.3/README.md → kea2_python-0.2.0/PKG-INFO +53 -30
- kea2_python-0.1.3/Kea2_python.egg-info/PKG-INFO → kea2_python-0.2.0/README.md +39 -43
- {kea2_python-0.1.3 → 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.3 → kea2_python-0.2.0}/kea2/keaUtils.py +61 -71
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/kea_launcher.py +15 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/resultSyncer.py +18 -8
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/templates/bug_report_template.html +9 -50
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/u2Driver.py +27 -30
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/utils.py +1 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/pyproject.toml +3 -2
- kea2_python-0.1.3/Kea2_python.egg-info/requires.txt +0 -3
- kea2_python-0.1.3/kea2/adbUtils.py +0 -290
- kea2_python-0.1.3/kea2/bug_report_generator.py +0 -479
- kea2_python-0.1.3/kea2/fastbotManager.py +0 -155
- {kea2_python-0.1.3 → kea2_python-0.2.0}/Kea2_python.egg-info/SOURCES.txt +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/LICENSE +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/__init__.py +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_configs/widget.block.py +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/framework.jar +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/kea2-thirdpart.jar +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/assets/quicktest.py +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/cli.py +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/kea2/logWatcher.py +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/setup.cfg +0 -0
- {kea2_python-0.1.3 → kea2_python-0.2.0}/tests/test_u2Selector.py +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
|
|
|
@@ -22,21 +23,36 @@ Dynamic: license-file
|
|
|
22
23
|
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
23
24
|
</div>
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
### Github repo link
|
|
27
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
28
30
|
|
|
29
|
-
|
|
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.
|
|
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>
|
|
30
45
|
|
|
31
|
-
## Important features
|
|
32
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*);
|
|
33
47
|
|
|
34
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);
|
|
35
49
|
|
|
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 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*).
|
|
37
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!
|
|
38
53
|
|
|
39
54
|
**The ability of the three features in Kea2**
|
|
55
|
+
|
|
40
56
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
41
57
|
| --- | --- | --- | ---- |
|
|
42
58
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -44,24 +60,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
44
60
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
45
61
|
|
|
46
62
|
|
|
47
|
-
<div align="center">
|
|
48
|
-
<div style="max-width:80%; max-height:80%">
|
|
49
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
|
|
54
63
|
|
|
55
64
|
## Design & Roadmap
|
|
56
|
-
Kea2
|
|
57
|
-
- [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;
|
|
58
67
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
59
68
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
60
69
|
|
|
61
70
|
In the future, Kea2 will be extended to support
|
|
62
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
63
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
64
|
-
- 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)
|
|
65
74
|
|
|
66
75
|
|
|
67
76
|
## Installation
|
|
@@ -115,7 +124,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
115
124
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
116
125
|
```
|
|
117
126
|
|
|
118
|
-
|
|
127
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
119
128
|
|
|
120
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).
|
|
121
130
|
|
|
@@ -178,13 +187,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
178
187
|
|
|
179
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).
|
|
180
189
|
|
|
181
|
-
<div align="center"
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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).
|
|
187
196
|
</div>
|
|
197
|
+
|
|
188
198
|
|
|
189
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.
|
|
190
200
|
|
|
@@ -209,12 +219,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
209
219
|
|
|
210
220
|
## Documentations(更多文档)
|
|
211
221
|
|
|
212
|
-
[
|
|
213
|
-
- Kea2
|
|
214
|
-
- Kea2
|
|
215
|
-
- Kea2
|
|
216
|
-
-
|
|
217
|
-
- [
|
|
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
|
|
218
228
|
|
|
219
229
|
## Open-source projects used by Kea2
|
|
220
230
|
|
|
@@ -1,3 +1,17 @@
|
|
|
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)
|
|
@@ -9,21 +23,36 @@
|
|
|
9
23
|
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
10
24
|
</div>
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
### Github repo link
|
|
27
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
28
|
+
|
|
29
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
30
|
+
|
|
31
|
+
## About
|
|
13
32
|
|
|
14
|
-
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*.
|
|
15
34
|
|
|
16
|
-
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>
|
|
17
45
|
|
|
18
|
-
## Important features
|
|
19
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*);
|
|
20
47
|
|
|
21
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);
|
|
22
49
|
|
|
23
|
-
- **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*).
|
|
24
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!
|
|
25
53
|
|
|
26
54
|
**The ability of the three features in Kea2**
|
|
55
|
+
|
|
27
56
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
28
57
|
| --- | --- | --- | ---- |
|
|
29
58
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -31,24 +60,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
31
60
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
32
61
|
|
|
33
62
|
|
|
34
|
-
<div align="center">
|
|
35
|
-
<div style="max-width:80%; max-height:80%">
|
|
36
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
|
|
41
63
|
|
|
42
64
|
## Design & Roadmap
|
|
43
|
-
Kea2
|
|
44
|
-
- [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;
|
|
45
67
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
46
68
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
47
69
|
|
|
48
70
|
In the future, Kea2 will be extended to support
|
|
49
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
50
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
51
|
-
- 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)
|
|
52
74
|
|
|
53
75
|
|
|
54
76
|
## Installation
|
|
@@ -102,7 +124,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
102
124
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
103
125
|
```
|
|
104
126
|
|
|
105
|
-
|
|
127
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
106
128
|
|
|
107
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).
|
|
108
130
|
|
|
@@ -165,13 +187,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
165
187
|
|
|
166
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).
|
|
167
189
|
|
|
168
|
-
<div align="center"
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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).
|
|
174
196
|
</div>
|
|
197
|
+
|
|
175
198
|
|
|
176
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.
|
|
177
200
|
|
|
@@ -196,12 +219,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
196
219
|
|
|
197
220
|
## Documentations(更多文档)
|
|
198
221
|
|
|
199
|
-
[
|
|
200
|
-
- Kea2
|
|
201
|
-
- Kea2
|
|
202
|
-
- Kea2
|
|
203
|
-
-
|
|
204
|
-
- [
|
|
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
|
|
205
228
|
|
|
206
229
|
## Open-source projects used by Kea2
|
|
207
230
|
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Kea2-python
|
|
3
|
-
Version: 0.1.3
|
|
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)
|
|
@@ -22,21 +9,36 @@ Dynamic: license-file
|
|
|
22
9
|
<img src="https://github.com/user-attachments/assets/aa5839fc-4542-46f6-918b-c9f891356c84" style="border-radius: 14px; width: 20%; height: 20%;"/>
|
|
23
10
|
</div>
|
|
24
11
|
|
|
25
|
-
|
|
12
|
+
### Github repo link
|
|
13
|
+
[https://github.com/ecnusse/Kea2](https://github.com/ecnusse/Kea2)
|
|
14
|
+
|
|
15
|
+
### [点击此处:查看中文文档](README_cn.md)
|
|
16
|
+
|
|
17
|
+
## About
|
|
26
18
|
|
|
27
|
-
Kea2 is an easy-to-use
|
|
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*.
|
|
28
20
|
|
|
29
|
-
Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2) and
|
|
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.
|
|
23
|
+
|
|
24
|
+
## Novelty & Important features
|
|
25
|
+
|
|
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>
|
|
30
31
|
|
|
31
|
-
## Important features
|
|
32
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*);
|
|
33
33
|
|
|
34
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);
|
|
35
35
|
|
|
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 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*).
|
|
37
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!
|
|
38
39
|
|
|
39
40
|
**The ability of the three features in Kea2**
|
|
41
|
+
|
|
40
42
|
| | **Feature 1** | **Feature 2** | **Feature 3** |
|
|
41
43
|
| --- | --- | --- | ---- |
|
|
42
44
|
| **Finding crashes** | :+1: | :+1: | :+1: |
|
|
@@ -44,24 +46,17 @@ Kea2 is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot
|
|
|
44
46
|
| **Finding non-crashing functional (logic) bugs** | | | :+1: |
|
|
45
47
|
|
|
46
48
|
|
|
47
|
-
<div align="center">
|
|
48
|
-
<div style="max-width:80%; max-height:80%">
|
|
49
|
-
<img src="docs/intro.png" style="border-radius: 14px; width: 80%; height: 80%;"/>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
|
|
54
49
|
|
|
55
50
|
## Design & Roadmap
|
|
56
|
-
Kea2
|
|
57
|
-
- [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;
|
|
58
53
|
- [uiautomator2](https://github.com/openatx/uiautomator2) as the UI test driver;
|
|
59
54
|
- [Fastbot](https://github.com/bytedance/Fastbot_Android) as the backend automated UI testing tool.
|
|
60
55
|
|
|
61
56
|
In the future, Kea2 will be extended to support
|
|
62
|
-
- [pytest](https://docs.pytest.org/en/stable/)
|
|
63
|
-
- [Appium](https://github.com/appium/appium), [Hypium](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines) (for HarmonyOS/Open Harmony)
|
|
64
|
-
- 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)
|
|
65
60
|
|
|
66
61
|
|
|
67
62
|
## Installation
|
|
@@ -115,7 +110,7 @@ Test your app with the full capability of Fastbot for stress testing and finding
|
|
|
115
110
|
kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
|
|
116
111
|
```
|
|
117
112
|
|
|
118
|
-
|
|
113
|
+
To understand the meanings of the options, you can see our [manual](docs/manual_en.md#launching-kea2).
|
|
119
114
|
|
|
120
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).
|
|
121
116
|
|
|
@@ -178,13 +173,14 @@ In Feature 3, a script is composed of three elements:
|
|
|
178
173
|
|
|
179
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).
|
|
180
175
|
|
|
181
|
-
<div align="center"
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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).
|
|
187
182
|
</div>
|
|
183
|
+
|
|
188
184
|
|
|
189
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.
|
|
190
186
|
|
|
@@ -209,12 +205,12 @@ You can run this example by using the similar command line in Feature 2.
|
|
|
209
205
|
|
|
210
206
|
## Documentations(更多文档)
|
|
211
207
|
|
|
212
|
-
[
|
|
213
|
-
- Kea2
|
|
214
|
-
- Kea2
|
|
215
|
-
- Kea2
|
|
216
|
-
-
|
|
217
|
-
- [
|
|
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
|
|
218
214
|
|
|
219
215
|
## Open-source projects used by Kea2
|
|
220
216
|
|