Kea2-python 0.0.1a3__tar.gz → 0.0.1a4__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.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/PKG-INFO +9 -10
  2. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/requires.txt +1 -1
  3. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/PKG-INFO +9 -10
  4. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/README.md +6 -7
  5. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/cli.py +2 -2
  6. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/keaUtils.py +11 -0
  7. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/kea_launcher.py +14 -2
  8. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/pyproject.toml +3 -3
  9. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/SOURCES.txt +0 -0
  10. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/dependency_links.txt +0 -0
  11. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/entry_points.txt +0 -0
  12. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/Kea2_python.egg-info/top_level.txt +0 -0
  13. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/LICENSE +0 -0
  14. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/__init__.py +0 -0
  15. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/absDriver.py +0 -0
  16. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/adbUtils.py +0 -0
  17. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot-thirdpart.jar +0 -0
  18. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/ADBKeyBoard.apk +0 -0
  19. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/abl.strings +0 -0
  20. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/awl.strings +0 -0
  21. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/max.config +0 -0
  22. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
  23. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
  24. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/max.strings +0 -0
  25. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
  26. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_configs/widget.block.py +0 -0
  27. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  28. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  29. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
  30. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  31. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/framework.jar +0 -0
  32. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/monkeyq.jar +0 -0
  33. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/quickstart.py +0 -0
  34. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/assets/u2.jar +0 -0
  35. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/logWatcher.py +0 -0
  36. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/u2Driver.py +0 -0
  37. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/kea2/utils.py +0 -0
  38. {kea2_python-0.0.1a3 → kea2_python-0.0.1a4}/setup.cfg +0 -0
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 0.0.1a3
3
+ Version: 0.0.1a4
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
- Requires-Python: >=3.9
6
+ Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
9
- Requires-Dist: rtree>=1.4.0
9
+ Requires-Dist: rtree>=1.3.0
10
10
  Requires-Dist: uiautomator2>=3.2.9
11
11
  Dynamic: license-file
12
12
 
13
13
  # Introduction
14
14
 
15
- Kea2 is an easy-to-use Python library for supporting and customizing automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
15
+ Kea2 is an easy-to-use Python library for supporting, customizing and improving automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
16
16
 
17
17
  ### Kea2 has three important features:
18
18
  - **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*);
@@ -52,7 +52,7 @@ In the future, Kea2 will be extended to support
52
52
 
53
53
  Running requirements/environment:
54
54
  - support Windows, MacOS and Linux
55
- - python 3.9+
55
+ - python 3.8+
56
56
  - Android SDK installed
57
57
  - **VPN closed** (Features 2 and 3 required)
58
58
 
@@ -99,7 +99,7 @@ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --
99
99
  ```
100
100
 
101
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.
102
- See more options by `python kea_launcher.py driver -h`
102
+ See more options by `kea2 run -h`
103
103
 
104
104
 
105
105
  ## Feature 2(自定义测试场景或事件序列): customizing testing scenarios by scripts
@@ -153,14 +153,13 @@ You can find the full example in script `quickstart.py` and run it by executing:
153
153
  python3 quickstart.py u2
154
154
  ```
155
155
 
156
+ In real use, you can use `kea2 run` to launch the customizing script.
157
+
156
158
  ```bash
157
159
  # 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
160
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest discover -p quickstart.py
159
161
  ```
160
162
 
161
-
162
-
163
-
164
163
  ## Feature 3(支持断言机制): Supporting auto-assertions by scripts.
165
164
 
166
165
  Kea2 supports auto-assertions when running Fastbot for finding *logic bugs* (i.e., *non-crashing bugs*). To achieve this, you can add assertions in the scripts. When an assertion fails during automated UI testing, we find a likely functional bug. This idea is inspired by [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea).
@@ -1,2 +1,2 @@
1
- rtree>=1.4.0
1
+ rtree>=1.3.0
2
2
  uiautomator2>=3.2.9
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 0.0.1a3
3
+ Version: 0.0.1a4
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
- Requires-Python: >=3.9
6
+ Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
9
- Requires-Dist: rtree>=1.4.0
9
+ Requires-Dist: rtree>=1.3.0
10
10
  Requires-Dist: uiautomator2>=3.2.9
11
11
  Dynamic: license-file
12
12
 
13
13
  # Introduction
14
14
 
15
- Kea2 is an easy-to-use Python library for supporting and customizing automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
15
+ Kea2 is an easy-to-use Python library for supporting, customizing and improving automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
16
16
 
17
17
  ### Kea2 has three important features:
18
18
  - **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*);
@@ -52,7 +52,7 @@ In the future, Kea2 will be extended to support
52
52
 
53
53
  Running requirements/environment:
54
54
  - support Windows, MacOS and Linux
55
- - python 3.9+
55
+ - python 3.8+
56
56
  - Android SDK installed
57
57
  - **VPN closed** (Features 2 and 3 required)
58
58
 
@@ -99,7 +99,7 @@ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --
99
99
  ```
100
100
 
101
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.
102
- See more options by `python kea_launcher.py driver -h`
102
+ See more options by `kea2 run -h`
103
103
 
104
104
 
105
105
  ## Feature 2(自定义测试场景或事件序列): customizing testing scenarios by scripts
@@ -153,14 +153,13 @@ You can find the full example in script `quickstart.py` and run it by executing:
153
153
  python3 quickstart.py u2
154
154
  ```
155
155
 
156
+ In real use, you can use `kea2 run` to launch the customizing script.
157
+
156
158
  ```bash
157
159
  # 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
160
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest discover -p quickstart.py
159
161
  ```
160
162
 
161
-
162
-
163
-
164
163
  ## Feature 3(支持断言机制): Supporting auto-assertions by scripts.
165
164
 
166
165
  Kea2 supports auto-assertions when running Fastbot for finding *logic bugs* (i.e., *non-crashing bugs*). To achieve this, you can add assertions in the scripts. When an assertion fails during automated UI testing, we find a likely functional bug. This idea is inspired by [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea).
@@ -1,6 +1,6 @@
1
1
  # Introduction
2
2
 
3
- Kea2 is an easy-to-use Python library for supporting and customizing automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
3
+ Kea2 is an easy-to-use Python library for supporting, customizing and improving automated UI testing for mobile apps. The library is currently built on top of [Fastbot](https://github.com/bytedance/Fastbot_Android) and [uiautomator2](https://github.com/openatx/uiautomator2), and targeting [Android](https://en.wikipedia.org/wiki/Android_(operating_system)) apps.
4
4
 
5
5
  ### Kea2 has three important features:
6
6
  - **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*);
@@ -40,7 +40,7 @@ In the future, Kea2 will be extended to support
40
40
 
41
41
  Running requirements/environment:
42
42
  - support Windows, MacOS and Linux
43
- - python 3.9+
43
+ - python 3.8+
44
44
  - Android SDK installed
45
45
  - **VPN closed** (Features 2 and 3 required)
46
46
 
@@ -87,7 +87,7 @@ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent native --
87
87
  ```
88
88
 
89
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.
90
- See more options by `python kea_launcher.py driver -h`
90
+ See more options by `kea2 run -h`
91
91
 
92
92
 
93
93
  ## Feature 2(自定义测试场景或事件序列): customizing testing scenarios by scripts
@@ -141,14 +141,13 @@ You can find the full example in script `quickstart.py` and run it by executing:
141
141
  python3 quickstart.py u2
142
142
  ```
143
143
 
144
+ In real use, you can use `kea2 run` to launch the customizing script.
145
+
144
146
  ```bash
145
147
  # 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
148
+ kea2 run -s "emulator-5554" -p it.feio.android.omninotes.alpha --agent u2 --running-minutes 10 --throttle 200 --driver-name d unittest discover -p quickstart.py
147
149
  ```
148
150
 
149
-
150
-
151
-
152
151
  ## Feature 3(支持断言机制): Supporting auto-assertions by scripts.
153
152
 
154
153
  Kea2 supports auto-assertions when running Fastbot for finding *logic bugs* (i.e., *non-crashing bugs*). To achieve this, you can add assertions in the scripts. When an assertion fails during automated UI testing, we find a likely functional bug. This idea is inspired by [property-based testing](https://en.wikipedia.org/wiki/Software_testing#Property_testing) inheritted from [Kea](https://github.com/ecnusse/Kea).
@@ -156,8 +156,8 @@ def main():
156
156
  kwargs.pop('args', None)
157
157
  sp.add_argument(*args, **kwargs)
158
158
 
159
- from .kea_launcher import _set_driver_parser
160
- _set_driver_parser(subparser)
159
+ from .kea_launcher import _set_runner_parser
160
+ _set_runner_parser(subparser)
161
161
  actions["run"] = cmd_run
162
162
  if sys.argv[1:] == ["run"]:
163
163
  sys.argv.append("-h")
@@ -94,6 +94,8 @@ class Options:
94
94
  running_mins: int = 10
95
95
  # time(ms) to wait when exploring the app
96
96
  throttle: int = 200
97
+ # the output_dir for saving logs and results
98
+ output_dir: str = "output"
97
99
 
98
100
 
99
101
  @dataclass
@@ -261,6 +263,13 @@ class KeaTestRunner(TextTestRunner):
261
263
  options.Driver = None
262
264
  cls.options = options
263
265
 
266
+ def _setOuputDir(self):
267
+ output_dir = Path(self.options.output_dir).absolute()
268
+ os.mkdir(output_dir, parents=True, exist_ok=True)
269
+ global LOGFILE, RESFILE
270
+ LOGFILE = output_dir / Path(LOGFILE)
271
+ RESFILE = output_dir / Path(RESFILE)
272
+
264
273
  def run(self, test):
265
274
 
266
275
  self.allProperties = dict()
@@ -269,6 +278,8 @@ class KeaTestRunner(TextTestRunner):
269
278
  if len(self.allProperties) == 0:
270
279
  print("[Warning] No property has been found.", flush=True)
271
280
 
281
+ self._setOuputDir()
282
+
272
283
  JsonResult.setProperties(self.allProperties)
273
284
  self.resultclass = JsonResult
274
285
 
@@ -1,9 +1,11 @@
1
+ import os
1
2
  import sys
2
3
  import argparse
3
4
  import unittest
5
+ from pathlib import Path
4
6
  from typing import List
5
7
 
6
- def _set_driver_parser(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]"):
8
+ def _set_runner_parser(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]"):
7
9
  parser = subparsers.add_parser("run", help="run kea2")
8
10
  parser.add_argument(
9
11
  "-s",
@@ -23,6 +25,16 @@ def _set_driver_parser(subparsers: "argparse._SubParsersAction[argparse.Argument
23
25
  help="The target package names com.example.app",
24
26
  )
25
27
 
28
+ parser.add_argument(
29
+ "-o",
30
+ "--output-dir",
31
+ dest="output_dir",
32
+ type=str,
33
+ required=False,
34
+ default="output",
35
+ help="The output dir for saving logs and results."
36
+ )
37
+
26
38
  parser.add_argument(
27
39
  "--agent",
28
40
  dest="agent",
@@ -96,7 +108,7 @@ def parse_args(argv: List):
96
108
  parser = argparse.ArgumentParser(description="Kea2")
97
109
  subparsers = parser.add_subparsers(dest="command", required=True)
98
110
 
99
- _set_driver_parser(subparsers)
111
+ _set_runner_parser(subparsers)
100
112
  args = parser.parse_args(argv)
101
113
  return args
102
114
 
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "Kea2-python"
3
- version = "0.0.1a3"
3
+ version = "0.0.1a4"
4
4
  description = "A python library for supporting and customizing automated UI testing for mobile apps"
5
5
  readme = "README.md"
6
- requires-python = ">=3.9"
6
+ requires-python = ">=3.8"
7
7
  dependencies = [
8
- "rtree>=1.4.0",
8
+ "rtree>=1.3.0",
9
9
  "uiautomator2>=3.2.9",
10
10
  ]
11
11
  authors = [
File without changes
File without changes