Kea2-python 0.0.1a1__py3-none-any.whl → 0.0.1a2__py3-none-any.whl

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/assets/quickstart.py CHANGED
@@ -73,7 +73,15 @@ def check_installation():
73
73
  d.stop_uiautomator()
74
74
 
75
75
 
76
+ def _get_agent():
77
+ import sys
78
+ if len(sys.argv) == 0 or sys.argv[1] == "u2":
79
+ return "u2"
80
+ return "native"
81
+
76
82
  if __name__ == "__main__":
83
+
84
+ AGENT=_get_agent()
77
85
  check_installation()
78
86
  KeaTestRunner.setOptions(
79
87
  Options(
@@ -84,7 +92,7 @@ if __name__ == "__main__":
84
92
  maxStep=5000,
85
93
  # running_mins=10, # specify the maximal running time in minutes, default value is 10m
86
94
  # throttle=200, # specify the throttle in milliseconds, default value is 200ms
87
- # agent='native' # 'native' for running the vanilla Fastbot, 'u2' for running Kea2
95
+ agent=AGENT # 'native' for running the vanilla Fastbot, 'u2' for running Kea2
88
96
  )
89
97
  )
90
98
  unittest.main(testRunner=KeaTestRunner)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 0.0.1a1
3
+ Version: 0.0.1a2
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.9
@@ -48,59 +48,20 @@ In the future, Kea2 will be extended to support
48
48
 
49
49
  > Kea2 is inspired by many valuable insights, advices and lessons shared by experienced industrial practitioners from Bytedance (Zhao Zhang, Yuhui Su from the Fastbot team), OPay (Tiesong Liu), WeChat (Haochuan Lu), Huawei, Xiaomi and etc. Kudos!
50
50
 
51
-
52
- # Deploy Kea2
53
-
54
51
  ## Installation
55
52
 
56
53
  Running requirements/environment:
57
54
  - support Windows, MacOS and Linux
58
- - python 3.8+
55
+ - python 3.9+
59
56
  - Android SDK installed
60
57
  - **VPN closed** (Features 2 and 3 required)
61
58
 
62
- 1. Clone `Kea2` into your workspace.
63
-
64
- ```bash
65
- git clone git@github.com:ecnusse/Kea2.git
66
- cd Kea2
67
- ```
68
-
69
- 2. Setup the python virtual environment with `uv`.
70
-
71
- > [uv](https://github.com/astral-sh/uv) is a extremely fast python package and project manager. We use `uv` to create a python virtual environment for Kea2 to avoid any dependency issues or conflicts with your existing python environment.
72
- `uv` is similar to `virtualenv` but much more powerful.
73
- Of course, you can also setup Kea2 in your [global environment](https://github.com/ecnusse/Kea2/tree/dev?tab=readme-ov-file#appendix-install-kea2-in-a-global-environment).
74
-
75
59
  ```bash
76
- pip install --upgrade pip
77
- pip install uv
78
- uv sync
79
- ```
60
+ python3 -m pip install Kea2-python
80
61
 
81
- > MacOS users may have trouble with global pip install. In such cases, they can use `brew`.
82
- ```bash
83
- # For macOS users
84
- brew install uv
85
- uv sync
62
+ kea2 -h
86
63
  ```
87
64
 
88
- 3. Activate virtual environment
89
-
90
- - Linux and macOS
91
- ```bash
92
- source .venv/bin/activate
93
- ```
94
-
95
- - Windows cmd
96
- ```cmd
97
- \.venv\Scripts\activate.bat
98
- ```
99
-
100
- - Windows powershell
101
- ```powershell
102
- \.venv\Scripts\activate.ps1
103
- ```
104
65
 
105
66
  ## Quick Test
106
67
 
@@ -111,7 +72,8 @@ Kea2 connects to and runs on Android devices. We recommend you to do a quick tes
111
72
  2. Run `quickstart.py` to test a sample app `omninotes` (released as `omninotes.apk` in Kea2's repository). The script `quickstart.py` will automatically install and test this sample app for a short time.
112
73
 
113
74
  ```python
114
- python3 quickstart.py
75
+ kea2 init
76
+ python3 quickstart.py native
115
77
  ```
116
78
 
117
79
  If you can see the app `omninotes` is successfully running and tested, Kea2 works. Otherwise, please help [file a bug report](https://github.com/ecnusse/Kea2/issues) with the error message to us. Thank you!
@@ -133,7 +95,7 @@ Test your app with the full capability of [Fastbot](https://github.com/bytedance
133
95
 
134
96
 
135
97
  ```bash
136
- python3 kea_launcher.py driver -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
98
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
137
99
  ```
138
100
 
139
101
  The usage is similar to the the original [Fastbot](https://github.com/bytedance/Fastbot_Android?tab=readme-ov-file#run-fastbot-with-shell-command)'s shell commands.
@@ -185,19 +147,17 @@ In this case, the `Home` page is the entry page of the `Privacy` page and the `H
185
147
  - In script's test method `test_goToPrivacy`, we specify the interaction logic (i.e., opening `Drawer`, clicking the option `Setting` and clicking `Privacy`) to guide Fastbot to reach the `Privacy` page.
186
148
  - By the decorator `@prob`, we specify the probability (50% in this example) to do the guidance when we are at the `Home` page. As a result, Kea2 still allows Fastbot to explore other pages.
187
149
 
188
- You can find the full example in script `quickstart2.py` and run it by executing:
150
+ You can find the full example in script `quickstart.py` and run it by executing:
189
151
 
152
+ ```python
153
+ python3 quickstart.py u2
154
+ ```
190
155
 
191
156
  ```bash
192
- # Launch Kea2 and load one single script quickstart2.py.
193
- python3 kea_launcher.py driver -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart2.py
157
+ # Launch Kea2 and load one single script quickstart.py.
158
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart.py
194
159
  ```
195
160
 
196
- or simply run:
197
-
198
- ```python
199
- python3 quickstart2.py
200
- ```
201
161
 
202
162
 
203
163
 
@@ -294,21 +254,21 @@ We offer two ways to launch Kea2.
294
254
 
295
255
  ### 1. Launch by shell commands
296
256
 
297
- Kea2 is compatible with `unittest` framework. You can manage your test cases in unittest style. You can launch Kea2 with `kea_launcher.py` with two sub-commands `driver` (for Kea2 options) and `unittest` (for unittest options).
257
+ Kea2 is compatible with `unittest` framework. You can manage your test cases in unittest style. You can launch Kea2 with `kea run` with driver options and sub-command `unittest` (for unittest options).
298
258
 
299
259
  The shell command:
300
260
  ```
301
- python3 kea_launcher.py driver <Kea2 cmds> unittest <unittest cmds>
261
+ kea2 run <Kea2 cmds> unittest <unittest cmds>
302
262
  ```
303
263
 
304
264
  Sample shell commands:
305
265
 
306
266
  ```bash
307
267
  # Launch Kea2 and load one single script quickstart.py.
308
- python3 kea_launcher.py driver -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart.py
268
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart.py
309
269
 
310
270
  # Launch Kea2 and load multiple scripts from the directory mytests/omni_notes
311
- python3 kea_launcher.py driver -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest discover -s mytests/omni_notes
271
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest discover -s mytests/omni_notes
312
272
  ```
313
273
 
314
274
  | arg | meaning |
@@ -10,7 +10,7 @@ kea2/utils.py,sha256=zjuoVwts2qVX9GnTaPoiqarfcSvyfW6cAD3ESf_dmrQ,1284
10
10
  kea2/assets/fastbot-thirdpart.jar,sha256=0SZ_OoZFWDGMnazgXKceHgKvXdUDoIa3Gb2bcifaikk,85664
11
11
  kea2/assets/framework.jar,sha256=rTluOJJKj2DFwh7ascXso1udYdWv00BxBwSQ3Vmv-fw,1149240
12
12
  kea2/assets/monkeyq.jar,sha256=TjszvflvE59ev9RhVhkfS_0L46VYZbL2wvpKRyA8ZMk,460366
13
- kea2/assets/quickstart.py,sha256=YsZCqLCwb5Mg8m0ybdyL-_TJ8FX2oKLyHZFJrk7fvkQ,2865
13
+ kea2/assets/quickstart.py,sha256=UeX_SIi_iEN9lzqit7dR1vSxA57fQ9ioCsBOSfzmkCY,3012
14
14
  kea2/assets/u2.jar,sha256=G9fFf-AZ0CdaZrk27V1-pfJE2Y5eO6PRzPShTnIe-U8,3746525
15
15
  kea2/assets/fastbot_configs/ADBKeyBoard.apk,sha256=L3Kva4gCQALo10EzinCvHrIbffGE3p94qSNbnS8CxP0,163634
16
16
  kea2/assets/fastbot_configs/abl.strings,sha256=Rn8_YEbVGOJqndIY_-kWnR5NaoFI-cuB-ij10Ddhl90,75
@@ -25,9 +25,9 @@ kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so,sha256=dA2Tf74-gDrCFdeCl
25
25
  kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so,sha256=GWcL8M8WfQAd9CfOM6pRYbOnxeycN-LiL7Mf59YIadE,1334420
26
26
  kea2/assets/fastbot_libs/x86/libfastbot_native.so,sha256=k-aw1gEXRWMKZRNHIggKNuZy0wC1y2BnveJGEIO6rbo,2036856
27
27
  kea2/assets/fastbot_libs/x86_64/libfastbot_native.so,sha256=tiofhlf4uMQcU5WAvrdLgTBME0lb83hVUoGtTwxmE8A,2121416
28
- kea2_python-0.0.1a1.dist-info/licenses/LICENSE,sha256=nM9PPjcsXVo5SzNsjRqWgA-gdJlwqZZcRDSC6Qf6bVE,2034
29
- kea2_python-0.0.1a1.dist-info/METADATA,sha256=RbaBvJeGaLU8YIGaYav-WsDB5HYsDmwFAoq3neLH-EQ,20168
30
- kea2_python-0.0.1a1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
31
- kea2_python-0.0.1a1.dist-info/entry_points.txt,sha256=mFX06TyxXiUAJQ6JZn8QHzfn8n5R8_KJ5W-pTm_fRCA,39
32
- kea2_python-0.0.1a1.dist-info/top_level.txt,sha256=TsgNH4PQoNOVhegpO7AcjutMVWp6Z4KDL1pBH9FnMmk,5
33
- kea2_python-0.0.1a1.dist-info/RECORD,,
28
+ kea2_python-0.0.1a2.dist-info/licenses/LICENSE,sha256=nM9PPjcsXVo5SzNsjRqWgA-gdJlwqZZcRDSC6Qf6bVE,2034
29
+ kea2_python-0.0.1a2.dist-info/METADATA,sha256=q4kT2cBZftSN2DmR966S-YvswbBuwJq6yX9j_ELrK2c,19032
30
+ kea2_python-0.0.1a2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
31
+ kea2_python-0.0.1a2.dist-info/entry_points.txt,sha256=mFX06TyxXiUAJQ6JZn8QHzfn8n5R8_KJ5W-pTm_fRCA,39
32
+ kea2_python-0.0.1a2.dist-info/top_level.txt,sha256=TsgNH4PQoNOVhegpO7AcjutMVWp6Z4KDL1pBH9FnMmk,5
33
+ kea2_python-0.0.1a2.dist-info/RECORD,,