Kea2-python 1.1.0b1__tar.gz → 1.1.2__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.
Files changed (58) hide show
  1. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/PKG-INFO +21 -5
  2. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/SOURCES.txt +0 -1
  3. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/PKG-INFO +21 -5
  4. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/README.md +20 -4
  5. kea2_python-1.1.2/kea2/assets/monkeyq.jar +0 -0
  6. kea2_python-1.1.2/kea2/assets/quicktest.py +148 -0
  7. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/cli.py +9 -1
  8. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/fastbotManager.py +1 -3
  9. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/kea2_api.py +7 -3
  10. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/keaUtils.py +159 -135
  11. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/kea_launcher.py +1 -3
  12. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/bug_report_generator.py +60 -35
  13. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/mixin.py +9 -8
  14. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/templates/bug_report_template.html +106 -18
  15. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/result.py +9 -7
  16. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/resultSyncer.py +2 -1
  17. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/u2Driver.py +3 -4
  18. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/utils.py +47 -0
  19. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/pyproject.toml +1 -1
  20. kea2_python-1.1.0b1/kea2/absDriver.py +0 -56
  21. kea2_python-1.1.0b1/kea2/assets/monkeyq.jar +0 -0
  22. kea2_python-1.1.0b1/kea2/assets/quicktest.py +0 -126
  23. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/dependency_links.txt +0 -0
  24. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/entry_points.txt +0 -0
  25. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/requires.txt +0 -0
  26. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/Kea2_python.egg-info/top_level.txt +0 -0
  27. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/LICENSE +0 -0
  28. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/__init__.py +0 -0
  29. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/adbUtils.py +0 -0
  30. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/config_version.json +0 -0
  31. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot-thirdpart.jar +0 -0
  32. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/abl.strings +0 -0
  33. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/awl.strings +0 -0
  34. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/max.config +0 -0
  35. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
  36. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
  37. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/max.strings +0 -0
  38. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
  39. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/teardown.py +0 -0
  40. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_configs/widget.block.py +0 -0
  41. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
  42. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
  43. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
  44. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
  45. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/framework.jar +0 -0
  46. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/assets/kea2-thirdpart.jar +0 -0
  47. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/logWatcher.py +0 -0
  48. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/mixin.py +0 -0
  49. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/__init__.py +0 -0
  50. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/report_merger.py +0 -0
  51. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/templates/merged_bug_report_template.html +0 -0
  52. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/report/utils.py +0 -0
  53. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/state.py +0 -0
  54. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/typedefs.py +0 -0
  55. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/kea2/version_manager.py +0 -0
  56. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/setup.cfg +0 -0
  57. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/tests/test_u2Selector.py +0 -0
  58. {kea2_python-1.1.0b1 → kea2_python-1.1.2}/tests/test_xpath.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 1.1.0b1
3
+ Version: 1.1.2
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
@@ -290,7 +290,7 @@ Some notes:
290
290
  3. You need to insert the following code template into your existing test cases: Here, you can add your own hook logic in the commented sections, including starting or stopping the appium session, cleaning up instances, etc. This depends on how you want to design the setup and teardown. Apart from that, you only need to configure the `option` parameter and `configs_path` parameter(where your directory `configs` located, btw, `configs`'s location dependon where you executed `kea2 init`), then pass it to the `run_kea2_testing` function.
291
291
 
292
292
  ```python
293
- from kea2 import Kea2Tester, Options, U2Driver
293
+ from kea2 import Kea2Tester, Options
294
294
 
295
295
  if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
296
296
  '''
@@ -326,12 +326,28 @@ if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
326
326
 
327
327
  Kea2 automatically generates a HTML test report after each testing session. You can find the report in `output/` under your working directory.
328
328
 
329
- You can also manually generate the test report by `kea2 report` (see `kea2 report -h` for details).
329
+ You can also manually generate the test report by
330
+ ```bash
331
+ kea2 report -p [RES_DIR]
332
+ ```
333
+
334
+ Use `-s/--sync` to sync data from device before generating the report, and `-p/--path` to point to one or more result directories.
335
+ For example:
336
+
337
+ ```bash
338
+ `kea2 report -p output/res_YYYYMMDDHH_xxxxxx`
339
+ `kea2 report -s -p output/res_YYYYMMDDHH_xxxxxx`
340
+ ```
341
+
342
+ You can also merge the test report from multiple testing sessions by
343
+
344
+ ```bash
345
+ kea2 merge -p [RES_DIR1] [RES_DIR2] ... -o [OUTPUT_DIR]
346
+ ```
330
347
 
331
- You can also merge the test report from multiple testing sessions by `kea2 merge` (see `kea2 merge -h` for details).
332
348
  The merged test report is quite useful if you would test your apps for multiple sessions.
333
349
 
334
- You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
350
+ > You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
335
351
 
336
352
  ## Documentations(更多文档)
337
353
 
@@ -8,7 +8,6 @@ Kea2_python.egg-info/entry_points.txt
8
8
  Kea2_python.egg-info/requires.txt
9
9
  Kea2_python.egg-info/top_level.txt
10
10
  kea2/__init__.py
11
- kea2/absDriver.py
12
11
  kea2/adbUtils.py
13
12
  kea2/cli.py
14
13
  kea2/fastbotManager.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Kea2-python
3
- Version: 1.1.0b1
3
+ Version: 1.1.2
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
@@ -290,7 +290,7 @@ Some notes:
290
290
  3. You need to insert the following code template into your existing test cases: Here, you can add your own hook logic in the commented sections, including starting or stopping the appium session, cleaning up instances, etc. This depends on how you want to design the setup and teardown. Apart from that, you only need to configure the `option` parameter and `configs_path` parameter(where your directory `configs` located, btw, `configs`'s location dependon where you executed `kea2 init`), then pass it to the `run_kea2_testing` function.
291
291
 
292
292
  ```python
293
- from kea2 import Kea2Tester, Options, U2Driver
293
+ from kea2 import Kea2Tester, Options
294
294
 
295
295
  if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
296
296
  '''
@@ -326,12 +326,28 @@ if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
326
326
 
327
327
  Kea2 automatically generates a HTML test report after each testing session. You can find the report in `output/` under your working directory.
328
328
 
329
- You can also manually generate the test report by `kea2 report` (see `kea2 report -h` for details).
329
+ You can also manually generate the test report by
330
+ ```bash
331
+ kea2 report -p [RES_DIR]
332
+ ```
333
+
334
+ Use `-s/--sync` to sync data from device before generating the report, and `-p/--path` to point to one or more result directories.
335
+ For example:
336
+
337
+ ```bash
338
+ `kea2 report -p output/res_YYYYMMDDHH_xxxxxx`
339
+ `kea2 report -s -p output/res_YYYYMMDDHH_xxxxxx`
340
+ ```
341
+
342
+ You can also merge the test report from multiple testing sessions by
343
+
344
+ ```bash
345
+ kea2 merge -p [RES_DIR1] [RES_DIR2] ... -o [OUTPUT_DIR]
346
+ ```
330
347
 
331
- You can also merge the test report from multiple testing sessions by `kea2 merge` (see `kea2 merge -h` for details).
332
348
  The merged test report is quite useful if you would test your apps for multiple sessions.
333
349
 
334
- You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
350
+ > You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
335
351
 
336
352
  ## Documentations(更多文档)
337
353
 
@@ -275,7 +275,7 @@ Some notes:
275
275
  3. You need to insert the following code template into your existing test cases: Here, you can add your own hook logic in the commented sections, including starting or stopping the appium session, cleaning up instances, etc. This depends on how you want to design the setup and teardown. Apart from that, you only need to configure the `option` parameter and `configs_path` parameter(where your directory `configs` located, btw, `configs`'s location dependon where you executed `kea2 init`), then pass it to the `run_kea2_testing` function.
276
276
 
277
277
  ```python
278
- from kea2 import Kea2Tester, Options, U2Driver
278
+ from kea2 import Kea2Tester, Options
279
279
 
280
280
  if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
281
281
  '''
@@ -311,12 +311,28 @@ if os.environ.get('KEA2_HYBRID_MODE', '').lower() == 'true':
311
311
 
312
312
  Kea2 automatically generates a HTML test report after each testing session. You can find the report in `output/` under your working directory.
313
313
 
314
- You can also manually generate the test report by `kea2 report` (see `kea2 report -h` for details).
314
+ You can also manually generate the test report by
315
+ ```bash
316
+ kea2 report -p [RES_DIR]
317
+ ```
318
+
319
+ Use `-s/--sync` to sync data from device before generating the report, and `-p/--path` to point to one or more result directories.
320
+ For example:
321
+
322
+ ```bash
323
+ `kea2 report -p output/res_YYYYMMDDHH_xxxxxx`
324
+ `kea2 report -s -p output/res_YYYYMMDDHH_xxxxxx`
325
+ ```
326
+
327
+ You can also merge the test report from multiple testing sessions by
328
+
329
+ ```bash
330
+ kea2 merge -p [RES_DIR1] [RES_DIR2] ... -o [OUTPUT_DIR]
331
+ ```
315
332
 
316
- You can also merge the test report from multiple testing sessions by `kea2 merge` (see `kea2 merge -h` for details).
317
333
  The merged test report is quite useful if you would test your apps for multiple sessions.
318
334
 
319
- You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
335
+ > You can find a sample [test report](https://ecnusse.github.io/Kea2_sample_report/) from Opay (Thank you!). You can find more details on the test report in [this documentation](docs/test_report_introduction.md).
320
336
 
321
337
  ## Documentations(更多文档)
322
338
 
@@ -0,0 +1,148 @@
1
+ import unittest
2
+ import uiautomator2 as u2
3
+
4
+ from time import sleep
5
+ from kea2 import precondition, prob, KeaTestRunner, Options, keaTestLoader, invariant
6
+
7
+
8
+ import unittest
9
+ import random
10
+ import uiautomator2 as u2
11
+ from uuid import uuid4
12
+ from kea2 import precondition, prob, max_tries
13
+
14
+ from kea2 import state # stateful testing
15
+
16
+
17
+ URL = "https://github.com/federicoiosue/Omni-Notes/releases/download/6.2.0_alpha/OmniNotes-alphaRelease-6.2.0.apk"
18
+ FALL_BACK_URL = "https://gitee.com/XixianLiang/Kea2/raw/main/omninotes.apk"
19
+ PACKAGE_NAME = "it.feio.android.omninotes.alpha"
20
+ FILE_NAME = "omninotes.apk"
21
+
22
+
23
+ state["notes"] = list()
24
+
25
+ def get_random_text():
26
+ return uuid4().hex[:6]
27
+
28
+ class TestOmniNotes(unittest.TestCase):
29
+ d: u2.Device
30
+
31
+ @classmethod
32
+ def setUpClass(cls):
33
+ """Global setting for uiautomator2 (Optional)
34
+ """
35
+ cls.d.settings["wait_timeout"] = 5.0
36
+ cls.d.settings["operation_delay"] = (0, 1.0)
37
+ cls.d.app_clear(PACKAGE_NAME)
38
+
39
+ @prob(0.3)
40
+ @precondition(
41
+ lambda self: self.d(resourceId="it.feio.android.omninotes.alpha:id/fab_expand_menu_button").exists
42
+ and not self.d(resourceId="it.feio.android.omninotes.alpha:id/fab_note").exists
43
+ and not self.d(resourceId="it.feio.android.omninotes.alpha:id/navdrawer_title").exists
44
+ )
45
+ def add_note(self):
46
+ """stateful testing: add a note and store in state
47
+ """
48
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/fab_expand_menu_button").long_click()
49
+ title = get_random_text()
50
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/detail_title").set_text(title)
51
+ self.d(description="drawer open").click()
52
+ state["notes"].append(title)
53
+
54
+ @prob(0.3)
55
+ @precondition(
56
+ lambda self: self.d(resourceId="it.feio.android.omninotes.alpha:id/menu_search").exists
57
+ and len(state["notes"]) > 0
58
+ and not self.d(resourceId="it.feio.android.omninotes.alpha:id/navdrawer_title").exists
59
+ )
60
+ def search_note(self):
61
+ """stateful testing: search an existed note.
62
+ """
63
+ expected_note = random.choice(state["notes"])
64
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/menu_search").click()
65
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/search_src_text").set_text(expected_note)
66
+ self.d.press("enter")
67
+ assert self.d(text=expected_note).exists, "the added note not found"
68
+
69
+ @precondition(lambda self: "camera" in self.d.app_current().get("package", ""))
70
+ def exit_camera(self):
71
+ """Guided exploration: Exit camera if it is launched
72
+ (fastbot can't exit camera app by itself, we use kea2 to exit it to avoid getting stuck in camera)
73
+ """
74
+ print("Exiting camera app")
75
+ pkg_camera = self.d.app_current().get("package", "")
76
+ print(f"Current package: {pkg_camera}")
77
+ if "camera" in pkg_camera:
78
+ self.d.app_stop(pkg_camera)
79
+
80
+ @max_tries(1)
81
+ @precondition(lambda self: self.d(resourceId="it.feio.android.omninotes.alpha:id/next").exists)
82
+ def skip_welcome_tour(self):
83
+ """Guided exploration: skip welcome tour if it is shown.
84
+ This is a one-shot action to skip the welcome tour (@max_tries(1))
85
+ """
86
+ while self.d(resourceId="it.feio.android.omninotes.alpha:id/next").exists:
87
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/next").click()
88
+ if self.d(resourceId="it.feio.android.omninotes.alpha:id/done").exists:
89
+ self.d(resourceId="it.feio.android.omninotes.alpha:id/done").click()
90
+
91
+ @invariant
92
+ def search_button_and_search_input_box_should_not_exists_at_the_same_time(self):
93
+ """Search input box and search button should not exists at the same time
94
+ """
95
+ search_input_box_exists = self.d(resourceId="it.feio.android.omninotes.alpha:id/search_src_text").exists
96
+ serach_button_exists = self.d(resourceId="it.feio.android.omninotes.alpha:id/menu_search").exists
97
+ if search_input_box_exists or serach_button_exists:
98
+ assert search_input_box_exists ^ serach_button_exists
99
+
100
+
101
+
102
+ # Download Utils
103
+ def download_omninotes():
104
+ import socket
105
+ socket.setdefaulttimeout(30)
106
+ try:
107
+ import urllib.request
108
+ urllib.request.urlretrieve(URL, FILE_NAME)
109
+ except Exception as e:
110
+ print(f"[WARN] Download from {URL} failed: {e}. Try to download from fallback URL {FALL_BACK_URL}", flush=True)
111
+ try:
112
+ urllib.request.urlretrieve(FALL_BACK_URL, FILE_NAME)
113
+ except Exception as e2:
114
+ print(f"[ERROR] Download from fallback URL {FALL_BACK_URL} also failed: {e2}", flush=True)
115
+ raise e2
116
+
117
+
118
+ def check_installation(serial=None):
119
+ import os
120
+ from pathlib import Path
121
+
122
+ d = u2.connect(serial)
123
+ # automatically install omni-notes
124
+ if PACKAGE_NAME not in d.app_list():
125
+ if not os.path.exists(Path(".") / FILE_NAME):
126
+ print(f"[INFO] omninote.apk not exists. Downloading from {URL}", flush=True)
127
+ download_omninotes()
128
+ print("[INFO] Installing omninotes.", flush=True)
129
+ d.app_install(FILE_NAME)
130
+ d.stop_uiautomator()
131
+
132
+
133
+ if __name__ == "__main__":
134
+ check_installation(serial=None)
135
+ KeaTestRunner.setOptions(
136
+ Options(
137
+ driverName="d",
138
+ packageNames=[PACKAGE_NAME],
139
+ # serial="emulator-5554", # specify the serial
140
+ maxStep=50,
141
+ profile_period=10,
142
+ take_screenshots=True, # whether to take screenshots, default is False
143
+ # running_mins=10, # specify the maximal running time in minutes, default value is 10m
144
+ # throttle=200, # specify the throttle in milliseconds, default value is 200ms
145
+ agent="u2" # 'native' for running the vanilla Fastbot, 'u2' for running Kea2
146
+ )
147
+ )
148
+ unittest.main(testRunner=KeaTestRunner, testLoader=keaTestLoader)
@@ -58,6 +58,8 @@ def cmd_report(args):
58
58
  from .report.bug_report_generator import BugReportGenerator
59
59
  report_dirs = args.path
60
60
 
61
+ sync_data = args.sync
62
+
61
63
  for report_dir in report_dirs:
62
64
  report_dir = Path(report_dir).resolve()
63
65
 
@@ -66,7 +68,7 @@ def cmd_report(args):
66
68
  continue
67
69
 
68
70
  logger.debug(f"Generating test report from directory: {report_dir}")
69
- BugReportGenerator(report_dir).generate_report()
71
+ BugReportGenerator(report_dir, sync_data).generate_report()
70
72
 
71
73
 
72
74
  def cmd_merge(args):
@@ -136,6 +138,12 @@ _commands = [
136
138
  nargs="+",
137
139
  required=True,
138
140
  help="Root directory path of the test results to generate report from"
141
+ ),
142
+ dict(
143
+ name=["sync_data"],
144
+ args=["-s", "--sync"],
145
+ action="store_true",
146
+ help="Sync data from device before generating report"
139
147
  )
140
148
  ]
141
149
  ),
@@ -237,7 +237,7 @@ class FastbotManager:
237
237
 
238
238
  outfile = open(self.log_file, "w", encoding="utf-8", buffering=1)
239
239
 
240
- logger.info("Options info: {}".format(asdict(self.options)))
240
+ logger.info("Options info: {}".format(self.options.to_dict()))
241
241
  logger.info("Launching fastbot with shell command:\n{}".format(" ".join(full_cmd)))
242
242
  logger.info("Fastbot log will be saved to {}".format(outfile.name))
243
243
 
@@ -265,5 +265,3 @@ class FastbotManager:
265
265
  self.thread.join()
266
266
 
267
267
 
268
-
269
-
@@ -106,11 +106,15 @@ class Kea2Tester:
106
106
 
107
107
  output_dir = self.options.output_dir
108
108
 
109
- from .keaUtils import STAMP, LOGFILE, RESFILE
109
+ from .utils import StampManager
110
110
 
111
111
  bug_report_path = output_dir / "bug_report.html"
112
- result_json_path = output_dir / RESFILE.name if hasattr(RESFILE, 'name') else output_dir / f"result_{STAMP}.json"
113
- log_file_path = output_dir / LOGFILE.name if hasattr(LOGFILE, 'name') else output_dir / f"fastbot_{STAMP}.log"
112
+ stamp_manager = StampManager()
113
+ stamp = stamp_manager.stamp or self.options.log_stamp
114
+ result_name = stamp_manager.result_file.name if stamp_manager.result_file else f"result_{stamp}.json"
115
+ log_name = stamp_manager.log_file.name if stamp_manager.log_file else f"fastbot_{stamp}.log"
116
+ result_json_path = output_dir / result_name
117
+ log_file_path = output_dir / log_name
114
118
 
115
119
  return {
116
120
  'executed': True,