Kea2-python 0.0.1a1__tar.gz → 0.0.1a2__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.

Files changed (38) hide show
  1. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/PKG-INFO +17 -57
  2. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/PKG-INFO +17 -57
  3. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/README.md +16 -56
  4. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/quickstart.py +9 -1
  5. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/pyproject.toml +1 -1
  6. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/SOURCES.txt +0 -0
  7. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/dependency_links.txt +0 -0
  8. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/entry_points.txt +0 -0
  9. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/requires.txt +0 -0
  10. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/Kea2_python.egg-info/top_level.txt +0 -0
  11. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/LICENSE +0 -0
  12. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/__init__.py +0 -0
  13. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/absDriver.py +0 -0
  14. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/adbUtils.py +0 -0
  15. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot-thirdpart.jar +0 -0
  16. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/ADBKeyBoard.apk +0 -0
  17. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/abl.strings +0 -0
  18. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/awl.strings +0 -0
  19. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/max.config +0 -0
  20. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
  21. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
  22. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/max.strings +0 -0
  23. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
  24. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_configs/widget.block.py +0 -0
  25. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  26. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  27. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
  28. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  29. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/framework.jar +0 -0
  30. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/monkeyq.jar +0 -0
  31. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/assets/u2.jar +0 -0
  32. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/cli.py +0 -0
  33. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/keaUtils.py +0 -0
  34. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/kea_launcher.py +0 -0
  35. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/logWatcher.py +0 -0
  36. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/u2Driver.py +0 -0
  37. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/kea2/utils.py +0 -0
  38. {kea2_python-0.0.1a1 → kea2_python-0.0.1a2}/setup.cfg +0 -0
@@ -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 |
@@ -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 |
@@ -36,59 +36,20 @@ In the future, Kea2 will be extended to support
36
36
 
37
37
  > 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!
38
38
 
39
-
40
- # Deploy Kea2
41
-
42
39
  ## Installation
43
40
 
44
41
  Running requirements/environment:
45
42
  - support Windows, MacOS and Linux
46
- - python 3.8+
43
+ - python 3.9+
47
44
  - Android SDK installed
48
45
  - **VPN closed** (Features 2 and 3 required)
49
46
 
50
- 1. Clone `Kea2` into your workspace.
51
-
52
- ```bash
53
- git clone git@github.com:ecnusse/Kea2.git
54
- cd Kea2
55
- ```
56
-
57
- 2. Setup the python virtual environment with `uv`.
58
-
59
- > [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.
60
- `uv` is similar to `virtualenv` but much more powerful.
61
- 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).
62
-
63
47
  ```bash
64
- pip install --upgrade pip
65
- pip install uv
66
- uv sync
67
- ```
48
+ python3 -m pip install Kea2-python
68
49
 
69
- > MacOS users may have trouble with global pip install. In such cases, they can use `brew`.
70
- ```bash
71
- # For macOS users
72
- brew install uv
73
- uv sync
50
+ kea2 -h
74
51
  ```
75
52
 
76
- 3. Activate virtual environment
77
-
78
- - Linux and macOS
79
- ```bash
80
- source .venv/bin/activate
81
- ```
82
-
83
- - Windows cmd
84
- ```cmd
85
- \.venv\Scripts\activate.bat
86
- ```
87
-
88
- - Windows powershell
89
- ```powershell
90
- \.venv\Scripts\activate.ps1
91
- ```
92
53
 
93
54
  ## Quick Test
94
55
 
@@ -99,7 +60,8 @@ Kea2 connects to and runs on Android devices. We recommend you to do a quick tes
99
60
  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.
100
61
 
101
62
  ```python
102
- python3 quickstart.py
63
+ kea2 init
64
+ python3 quickstart.py native
103
65
  ```
104
66
 
105
67
  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!
@@ -121,7 +83,7 @@ Test your app with the full capability of [Fastbot](https://github.com/bytedance
121
83
 
122
84
 
123
85
  ```bash
124
- python3 kea_launcher.py driver -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
86
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --running-minutes 10 --throttle 200
125
87
  ```
126
88
 
127
89
  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.
@@ -173,19 +135,17 @@ In this case, the `Home` page is the entry page of the `Privacy` page and the `H
173
135
  - 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.
174
136
  - 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.
175
137
 
176
- You can find the full example in script `quickstart2.py` and run it by executing:
138
+ You can find the full example in script `quickstart.py` and run it by executing:
177
139
 
140
+ ```python
141
+ python3 quickstart.py u2
142
+ ```
178
143
 
179
144
  ```bash
180
- # Launch Kea2 and load one single script quickstart2.py.
181
- 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
145
+ # Launch Kea2 and load one single script quickstart.py.
146
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart.py
182
147
  ```
183
148
 
184
- or simply run:
185
-
186
- ```python
187
- python3 quickstart2.py
188
- ```
189
149
 
190
150
 
191
151
 
@@ -282,21 +242,21 @@ We offer two ways to launch Kea2.
282
242
 
283
243
  ### 1. Launch by shell commands
284
244
 
285
- 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).
245
+ 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).
286
246
 
287
247
  The shell command:
288
248
  ```
289
- python3 kea_launcher.py driver <Kea2 cmds> unittest <unittest cmds>
249
+ kea2 run <Kea2 cmds> unittest <unittest cmds>
290
250
  ```
291
251
 
292
252
  Sample shell commands:
293
253
 
294
254
  ```bash
295
255
  # Launch Kea2 and load one single script quickstart.py.
296
- 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
256
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest quickstart.py
297
257
 
298
258
  # Launch Kea2 and load multiple scripts from the directory mytests/omni_notes
299
- 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
259
+ 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
300
260
  ```
301
261
 
302
262
  | arg | meaning |
@@ -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
  [project]
2
2
  name = "Kea2-python"
3
- version = "0.0.1a1"
3
+ version = "0.0.1a2"
4
4
  description = "A python library for supporting and customizing automated UI testing for mobile apps"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
File without changes
File without changes
File without changes