Kea2-python 0.3.4__py3-none-any.whl → 0.3.6__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/monkeyq.jar CHANGED
Binary file
@@ -538,7 +538,7 @@ class BugReportGenerator:
538
538
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
539
539
 
540
540
  # Ensure coverage_trend has data
541
- if not data["coverage_trend"]:
541
+ if not data.get("coverage_trend"):
542
542
  logger.warning("No coverage trend data")
543
543
  # Use the same field names as in coverage.log file
544
544
  data["coverage_trend"] = [{"stepsCount": 0, "coverage": 0, "testedActivitiesCount": 0}]
kea2/fastbotManager.py CHANGED
@@ -2,13 +2,12 @@ from retry import retry
2
2
  from retry.api import retry_call
3
3
  from dataclasses import asdict
4
4
  import requests
5
- from time import sleep
6
- from pkg_resources import parse_version
5
+ from packaging.version import parse as parse_version
7
6
 
8
7
  from uiautomator2.core import HTTPResponse, _http_request
9
8
  from kea2.adbUtils import ADBDevice, ADBStreamShell_V2
10
9
  from pathlib import Path
11
- from kea2.utils import getLogger
10
+ from kea2.utils import getLogger, getProjectRoot
12
11
 
13
12
 
14
13
  from typing import IO, TYPE_CHECKING, Dict
@@ -71,14 +70,15 @@ class FastbotManager:
71
70
  "/data/local/tmp/x86_64/libfastbot_native.so",
72
71
  )
73
72
 
73
+ cwd = getProjectRoot()
74
74
  whitelist = self.options.act_whitelist_file
75
75
  blacklist = self.options.act_blacklist_file
76
76
  if bool(whitelist) ^ bool(blacklist):
77
77
  if whitelist:
78
- file_to_push = cur_dir.parent / 'configs' / 'awl.strings'
78
+ file_to_push = cwd / 'configs' / 'awl.strings'
79
79
  remote_path = whitelist
80
80
  else:
81
- file_to_push = cur_dir.parent / 'configs' / 'abl.strings'
81
+ file_to_push = cwd / 'configs' / 'abl.strings'
82
82
  remote_path = blacklist
83
83
 
84
84
  self.dev.sync.push(
@@ -198,6 +198,9 @@ class FastbotManager:
198
198
 
199
199
  shell_command += ["-v", "-v", "-v"]
200
200
 
201
+ if self.options.extra_args:
202
+ shell_command += self.options.extra_args
203
+
201
204
  full_cmd = ["adb"] + (["-s", self.options.serial] if self.options.serial else []) + ["shell"] + shell_command
202
205
 
203
206
 
kea2/keaUtils.py CHANGED
@@ -136,6 +136,8 @@ class Options:
136
136
  act_whitelist_file: str = None
137
137
  # Activity BlackList File
138
138
  act_blacklist_file: str = None
139
+ # Extra args
140
+ extra_args: List[str] = None
139
141
 
140
142
  def __setattr__(self, name, value):
141
143
  if value is None:
kea2/kea_launcher.py CHANGED
@@ -148,8 +148,8 @@ def _set_runner_parser(subparsers: "argparse._SubParsersAction[argparse.Argument
148
148
  def unittest_info_logger(args):
149
149
  if args.agent == "native":
150
150
  print("[Warning] Property not availble in native agent.", flush=True)
151
- if args.extra and args.extra[0] == "unittest":
152
- print("Captured unittest args:", args.extra, flush=True)
151
+ if args.unittest_args:
152
+ print("Captured unittest args:", args.unittest_args, flush=True)
153
153
 
154
154
 
155
155
  def driver_info_logger(args):
@@ -189,7 +189,13 @@ def _sanitize_args(args):
189
189
  args.driver_name = "d"
190
190
  else:
191
191
  raise ValueError("--driver-name should be specified when customizing script in --agent u2")
192
-
192
+ if args.extra:
193
+ args.extra = args.extra[1:] if args.extra[0] == "--" else args.extra
194
+ unittest_index = args.extra.index("unittest") if "unittest" in args.extra else -1
195
+ if unittest_index != -1:
196
+ unittest_args = args.extra[unittest_index+1:]
197
+ setattr(args, "unittest_args", unittest_args)
198
+ args.extra = args.extra[:unittest_index]
193
199
 
194
200
  def run(args=None):
195
201
  if args is None:
@@ -197,6 +203,9 @@ def run(args=None):
197
203
  _sanitize_args(args)
198
204
  driver_info_logger(args)
199
205
  unittest_info_logger(args)
206
+ if args.extra:
207
+ print("[Warning] Captured extra args:", args.extra, flush=True)
208
+ print("The extra args will be passed into fastbot launcher.", flush=True)
200
209
 
201
210
  from kea2 import KeaTestRunner, Options
202
211
  from kea2.u2Driver import U2Driver
@@ -214,15 +223,13 @@ def run(args=None):
214
223
  profile_period=args.profile_period,
215
224
  take_screenshots=args.take_screenshots,
216
225
  device_output_root=args.device_output_root,
217
- act_whitelist_file = args.act_whitelist_file,
218
- act_blacklist_file=args.act_blacklist_file
226
+ act_whitelist_file=args.act_whitelist_file,
227
+ act_blacklist_file=args.act_blacklist_file,
228
+ extra_args=args.extra,
219
229
  )
220
230
 
221
231
  KeaTestRunner.setOptions(options)
222
- unittest_args = []
223
- if args.extra and args.extra[0] == "unittest":
224
- unittest_args = args.extra[1:]
225
- sys.argv = ["python3 -m unittest"] + unittest_args
232
+ sys.argv = ["python3 -m unittest"] + args.unittest_args
226
233
 
227
234
  unittest.main(module=None, testRunner=KeaTestRunner)
228
235
 
@@ -229,14 +229,14 @@
229
229
  }
230
230
 
231
231
  .table-custom tr.collapse pre {
232
- max-height: 300px;
233
- overflow-y: auto;
234
232
  font-size: 0.85rem;
235
233
  line-height: 1.4;
236
234
  background-color: #f8f9fa;
237
235
  border: 1px solid #e9ecef;
238
236
  border-radius: 4px;
239
237
  padding: 0.75rem;
238
+ white-space: pre-wrap;
239
+ word-wrap: break-word;
240
240
  }
241
241
 
242
242
  .table-custom tr.collapse details {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 0.3.4
3
+ Version: 0.3.6
4
4
  Summary: A python library for supporting and customizing automated UI testing for mobile apps
5
5
  Author-email: Xixian Liang <xixian@stu.ecnu.edu.cn>
6
6
  Requires-Python: >=3.8
@@ -10,7 +10,7 @@ Requires-Dist: rtree>=1.3.0
10
10
  Requires-Dist: jinja2>=3.0.0
11
11
  Requires-Dist: uiautomator2>=3.3.3
12
12
  Requires-Dist: adbutils>=2.9.3
13
- Requires-Dist: setuptools>=75.3.2
13
+ Requires-Dist: packaging>=25.0
14
14
  Dynamic: license-file
15
15
 
16
16
 
@@ -260,6 +260,8 @@ You can find the [user manual](docs/manual_en.md), which includes:
260
260
  - How to find and understand Kea2's testing results
261
261
  - How to [whitelist or blacklist](docs/blacklisting.md) specific activities, UI widgets and UI regions during fuzzing
262
262
  - [Q&A for Kea2 and PBT (对Kea2和PBT技术的常见问题和回答)](https://sy8pzmhmun.feishu.cn/wiki/SLGwwqgzIiEuC3kwmV8cSZY0nTg?from=from_copylink)
263
+ - [Kea2 101 (Kea2 从0到1 的入门教程与最佳实践,建议新手阅读)](https://sy8pzmhmun.feishu.cn/wiki/EwaWwPCitiUJoBkIgALcHtglnDK?from=from_copylink)
264
+ - [Kea2 分享交流会 (2025.09, bilibili 录播)](https://www.bilibili.com/video/BV1CZYNz9Ei5/?vd_source=ab7968b8d764666d85d24af49d9b8891)
263
265
 
264
266
  Some blogs on Kea/Kea2 (in Chinese):
265
267
  - [别再苦哈哈写测试脚本了,生成它们吧!(一)](https://mp.weixin.qq.com/s/R2kLCkXpDjpa8wCX4Eidtg)
@@ -339,7 +341,7 @@ Kea2 has been actively developed and maintained by the people in [ecnusse](https
339
341
  [@Drifterpc]: https://github.com/Drifterpc
340
342
  [@tingsu]: https://github.com/tingsu
341
343
 
342
- [Zhendong Su](https://people.inf.ethz.ch/suz/), [Yiheng Xiong](https://xyiheng.github.io/), [Xiangchen Shen](https://xiangchenshen.github.io/), [Mengqian Xu](https://mengqianx.github.io/), [Haiying Sun](https://faculty.ecnu.edu.cn/_s43/shy/main.psp), [Jingling Sun](https://jinglingsun.github.io/), [Jue Wang](https://cv.juewang.info/) have also been actively participated in this project and contributed a lot!
344
+ [Zhendong Su](https://people.inf.ethz.ch/suz/), [Yiheng Xiong](https://xyiheng.github.io/), [Xiangchen Shen](https://xiangchenshen.github.io/), [Mengqian Xu](https://mengqianx.github.io/), [Haiying Sun](https://faculty.ecnu.edu.cn/_s43/shy/main.psp), [Jingling Sun](https://jinglingsun.github.io/), [Jue Wang](https://cv.juewang.info/), [Geguang Pu]() have also been actively participated in this project and contributed a lot!
343
345
 
344
346
  Kea2 has also received many valuable insights, advices, feedbacks and lessons shared by several industrial people from Bytedance ([Zhao Zhang](https://github.com/zhangzhao4444), Yuhui Su from the Fastbot team), OPay (Tiesong Liu), WeChat (Haochuan Lu, Yuetang Deng), Huawei, Xiaomi and etc. Kudos!
345
347
 
@@ -1,11 +1,11 @@
1
1
  kea2/__init__.py,sha256=JFJjqgf5KB4bXUFQ3upkEug0cFMFIk9p3OHV9vzulHw,75
2
2
  kea2/absDriver.py,sha256=NzmsLs1Ojz-yEXctGAqj7aKBwAQW19zd83l65RABCe8,1288
3
3
  kea2/adbUtils.py,sha256=zi0T0_g44xZQZe3XYzBsuh7VTHpdZ4dd6yKi-p7BTYI,19939
4
- kea2/bug_report_generator.py,sha256=gASx3AasGWAufb4A8T4dv0-22knu7h24Z9M9NBSzy24,44107
4
+ kea2/bug_report_generator.py,sha256=swKg2bbfhtpSX6VfqgnsqAXkYr6WNJ5G7wnXp67IlQ8,44111
5
5
  kea2/cli.py,sha256=MccJhY8VPZa1rMAbirm3dmbzDx1lf2w3zrpF1ZUq2m0,6481
6
- kea2/fastbotManager.py,sha256=pGuAH-X26nOy2Qj6Hg5aoMxJx4KfsRk6bj6nhcPENGc,8158
7
- kea2/keaUtils.py,sha256=zfTmG23KmWmf5b71rrPTxwnpZhZ6gdlLD9eIhjAZv4Y,25834
8
- kea2/kea_launcher.py,sha256=M9TMCdgkteCWO5iBxJRDRvb7dikanoPf3jdicCEurU8,6268
6
+ kea2/fastbotManager.py,sha256=HaCL-cd7IKhk9Stp-3wx_U_4LnVYLG8UOIF5ih9iqnI,8263
7
+ kea2/keaUtils.py,sha256=pWxJVbXRHQdXC-Ob8aYDwEjGBF72DuBEPNekDJBlo5M,25884
8
+ kea2/kea_launcher.py,sha256=LpidhW90nFhCKh5bEMfUH_LkCuxa66XUqJAr_VoBerc,6734
9
9
  kea2/logWatcher.py,sha256=Dp6OzvLSuWYw0AqdcPDqfotaRZQgpF8S49LInGsAWp8,2599
10
10
  kea2/report_merger.py,sha256=0b-g59pdrsJDwVNek02ouu1utuu_Sd_1oEMQa4e23xI,24884
11
11
  kea2/resultSyncer.py,sha256=9kb3H0Innwj7oPboDDTf97nbjam7EP6HYxywR9B8SvM,2437
@@ -14,7 +14,7 @@ kea2/utils.py,sha256=x0VTGweW-XShG9MuwZDMP13SBg8jQXYa7e0AXdwYX38,3270
14
14
  kea2/assets/fastbot-thirdpart.jar,sha256=0SZ_OoZFWDGMnazgXKceHgKvXdUDoIa3Gb2bcifaikk,85664
15
15
  kea2/assets/framework.jar,sha256=rTluOJJKj2DFwh7ascXso1udYdWv00BxBwSQ3Vmv-fw,1149240
16
16
  kea2/assets/kea2-thirdpart.jar,sha256=HYdtG2gqDLuLb72dpK3lX-Y6QUNTrJ-bfQopU5aWpfo,359346
17
- kea2/assets/monkeyq.jar,sha256=4_WLifmU9q5noqMofZWW15Gh8kcuVouNrI-Ca5_g-BM,113104
17
+ kea2/assets/monkeyq.jar,sha256=fYC4ynmJcZ5HFQ9zpHSF6CrGLcnldasZfWGtcJ9VgZc,113488
18
18
  kea2/assets/quicktest.py,sha256=BgTul5jfSBCh6hVSMRmur61M6_KNTkzIT6Bdff72TE4,3009
19
19
  kea2/assets/fastbot_configs/abl.strings,sha256=Rn8_YEbVGOJqndIY_-kWnR5NaoFI-cuB-ij10Ddhl90,75
20
20
  kea2/assets/fastbot_configs/awl.strings,sha256=-j4980GoWQxGOM9ijAwXPQmziCwFBZJFmuiv2tOEaYI,101
@@ -28,11 +28,11 @@ kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so,sha256=tAFrG73pJi7XakRxS
28
28
  kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so,sha256=UV8bhaiPoPKdd3q0vj3kSZqPR9anllai_tz_2QkMMbQ,1335372
29
29
  kea2/assets/fastbot_libs/x86/libfastbot_native.so,sha256=k-aw1gEXRWMKZRNHIggKNuZy0wC1y2BnveJGEIO6rbo,2036856
30
30
  kea2/assets/fastbot_libs/x86_64/libfastbot_native.so,sha256=tiofhlf4uMQcU5WAvrdLgTBME0lb83hVUoGtTwxmE8A,2121416
31
- kea2/templates/bug_report_template.html,sha256=amZUwlJSg1jzpb1-RB0W6fzwXYZBQK-4SHdhj6LYSbo,152983
31
+ kea2/templates/bug_report_template.html,sha256=SkqssIKPOEP_3CjRZuxXEnANVnefg_fYNi97guDDNh8,152992
32
32
  kea2/templates/merged_bug_report_template.html,sha256=iWoXxvN3YQzCabi7BTP4sGl2F6LQrR3_HcG0aD3fHtk,135668
33
- kea2_python-0.3.4.dist-info/licenses/LICENSE,sha256=nM9PPjcsXVo5SzNsjRqWgA-gdJlwqZZcRDSC6Qf6bVE,2034
34
- kea2_python-0.3.4.dist-info/METADATA,sha256=owA_RN6ZzlDdCqzVoNoAbsUcvpXNXixhFUiAwZpjKHQ,18983
35
- kea2_python-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
- kea2_python-0.3.4.dist-info/entry_points.txt,sha256=mFX06TyxXiUAJQ6JZn8QHzfn8n5R8_KJ5W-pTm_fRCA,39
37
- kea2_python-0.3.4.dist-info/top_level.txt,sha256=TsgNH4PQoNOVhegpO7AcjutMVWp6Z4KDL1pBH9FnMmk,5
38
- kea2_python-0.3.4.dist-info/RECORD,,
33
+ kea2_python-0.3.6.dist-info/licenses/LICENSE,sha256=nM9PPjcsXVo5SzNsjRqWgA-gdJlwqZZcRDSC6Qf6bVE,2034
34
+ kea2_python-0.3.6.dist-info/METADATA,sha256=noBg-rOuzQQ_Gtw9mdLCN_yT_Ua7k7lHdiDSt_xHKOE,19300
35
+ kea2_python-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ kea2_python-0.3.6.dist-info/entry_points.txt,sha256=mFX06TyxXiUAJQ6JZn8QHzfn8n5R8_KJ5W-pTm_fRCA,39
37
+ kea2_python-0.3.6.dist-info/top_level.txt,sha256=TsgNH4PQoNOVhegpO7AcjutMVWp6Z4KDL1pBH9FnMmk,5
38
+ kea2_python-0.3.6.dist-info/RECORD,,