cucu 1.0.10__py3-none-any.whl → 1.0.12__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 cucu might be problematic. Click here for more details.
- cucu/browser/selenium.py +4 -4
- cucu/cli/core.py +2 -2
- cucu/environment.py +1 -1
- cucu/formatter/junit.py +23 -12
- cucu/logger.py +15 -1
- cucu/page_checks.py +1 -1
- cucu/reporter/html.py +3 -3
- cucu/steps/table_steps.py +1 -1
- {cucu-1.0.10.dist-info → cucu-1.0.12.dist-info}/METADATA +12 -7
- {cucu-1.0.10.dist-info → cucu-1.0.12.dist-info}/RECORD +13 -13
- {cucu-1.0.10.dist-info → cucu-1.0.12.dist-info}/WHEEL +0 -0
- {cucu-1.0.10.dist-info → cucu-1.0.12.dist-info}/entry_points.txt +0 -0
- {cucu-1.0.10.dist-info → cucu-1.0.12.dist-info}/licenses/LICENSE +0 -0
cucu/browser/selenium.py
CHANGED
|
@@ -37,7 +37,7 @@ def init():
|
|
|
37
37
|
|
|
38
38
|
if config.CONFIG["CUCU_BROWSER"] == "firefox":
|
|
39
39
|
# https://github.com/mozilla/geckodriver/issues/330
|
|
40
|
-
logger.
|
|
40
|
+
logger.warning("browser console logs not available on firefox")
|
|
41
41
|
geckodriver_autoinstaller.install()
|
|
42
42
|
|
|
43
43
|
if config.CONFIG["CUCU_BROWSER"] == "edge":
|
|
@@ -277,14 +277,14 @@ class Selenium(Browser):
|
|
|
277
277
|
|
|
278
278
|
def download_mht(self, target_filepath):
|
|
279
279
|
if self.driver is None:
|
|
280
|
-
logger.
|
|
280
|
+
logger.warning(
|
|
281
281
|
"No active browser; will not attempt to download .mht file."
|
|
282
282
|
)
|
|
283
283
|
return
|
|
284
284
|
|
|
285
285
|
browser_name = self.driver.name.lower()
|
|
286
286
|
if "chrome" not in browser_name:
|
|
287
|
-
logger.
|
|
287
|
+
logger.warning(
|
|
288
288
|
"The web driver is not using Chrome as a web browser"
|
|
289
289
|
f", but {browser_name}. This browser does not support"
|
|
290
290
|
"dowloading .mht files; will not attempt to download one."
|
|
@@ -311,7 +311,7 @@ class Selenium(Browser):
|
|
|
311
311
|
mht_data = mht_response.get("data")
|
|
312
312
|
|
|
313
313
|
if mht_data is None:
|
|
314
|
-
logger.
|
|
314
|
+
logger.warning(
|
|
315
315
|
"Something unexpected has happened: fetched MHT data, but that data was empty. Not writing MHT file."
|
|
316
316
|
)
|
|
317
317
|
return
|
cucu/cli/core.py
CHANGED
|
@@ -390,7 +390,7 @@ def run(
|
|
|
390
390
|
signal.signal(
|
|
391
391
|
signum, signal.SIG_IGN
|
|
392
392
|
) # ignore additional signals
|
|
393
|
-
logger.
|
|
393
|
+
logger.warning(
|
|
394
394
|
f"received signal {signum}, sending kill signal to workers"
|
|
395
395
|
)
|
|
396
396
|
kill_workers()
|
|
@@ -468,7 +468,7 @@ def run(
|
|
|
468
468
|
time.sleep(1)
|
|
469
469
|
|
|
470
470
|
if timeout_reached:
|
|
471
|
-
logger.
|
|
471
|
+
logger.warning("Timeout reached, send kill signal to workers")
|
|
472
472
|
kill_workers()
|
|
473
473
|
|
|
474
474
|
task_failed.update(async_results)
|
cucu/environment.py
CHANGED
|
@@ -159,7 +159,7 @@ def run_after_scenario_hook(ctx, scenario, hook):
|
|
|
159
159
|
|
|
160
160
|
def after_scenario(ctx, scenario):
|
|
161
161
|
for timer_name in ctx.step_timers:
|
|
162
|
-
logger.
|
|
162
|
+
logger.warning(f'timer "{timer_name}" was never stopped/recorded')
|
|
163
163
|
|
|
164
164
|
run_after_scenario_hook(ctx, scenario, download_mht_data)
|
|
165
165
|
|
cucu/formatter/junit.py
CHANGED
|
@@ -241,20 +241,31 @@ class CucuJUnitFormatter(Formatter):
|
|
|
241
241
|
return
|
|
242
242
|
|
|
243
243
|
# calculate with the latest data
|
|
244
|
-
|
|
245
|
-
testsuite["
|
|
246
|
-
|
|
244
|
+
# workaround for beatufulsoup4 removing the attribute if it is set to 0
|
|
245
|
+
testsuite["tests"] = str(len(scenarios))
|
|
246
|
+
testsuite["failures"] = str(
|
|
247
|
+
len(
|
|
248
|
+
[x for x in scenarios.values() if x["status"] == Status.failed]
|
|
249
|
+
)
|
|
247
250
|
)
|
|
248
|
-
testsuite["skipped"] =
|
|
249
|
-
|
|
251
|
+
testsuite["skipped"] = str(
|
|
252
|
+
len(
|
|
253
|
+
[
|
|
254
|
+
x
|
|
255
|
+
for x in scenarios.values()
|
|
256
|
+
if x["status"] == Status.skipped
|
|
257
|
+
]
|
|
258
|
+
)
|
|
250
259
|
)
|
|
251
|
-
testsuite["errors"] =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
260
|
+
testsuite["errors"] = str(
|
|
261
|
+
len(
|
|
262
|
+
[
|
|
263
|
+
x
|
|
264
|
+
for x in scenarios.values()
|
|
265
|
+
if x["status"]
|
|
266
|
+
not in (Status.failed, Status.skipped, Status.passed)
|
|
267
|
+
]
|
|
268
|
+
)
|
|
258
269
|
)
|
|
259
270
|
|
|
260
271
|
if "tags" in results:
|
cucu/logger.py
CHANGED
|
@@ -80,11 +80,25 @@ def info(*args, **kwargs):
|
|
|
80
80
|
logging.info(*args, **kwargs)
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
@wraps(logging.
|
|
83
|
+
@wraps(logging.warning)
|
|
84
84
|
def warn(*args, **kwargs):
|
|
85
85
|
console_handler = logging.getLogger().handlers[0]
|
|
86
86
|
logging_level = console_handler.level
|
|
87
87
|
|
|
88
|
+
if logging_level <= logging.WARN:
|
|
89
|
+
CONFIG["__CUCU_WROTE_TO_OUTPUT"] = True
|
|
90
|
+
|
|
91
|
+
logging.getLogger().warning(
|
|
92
|
+
'The method "warn" is deprecated use warning() instead.'
|
|
93
|
+
)
|
|
94
|
+
logging.getLogger().warning(*args, **kwargs)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@wraps(logging.warning)
|
|
98
|
+
def warning(*args, **kwargs):
|
|
99
|
+
console_handler = logging.getLogger().handlers[0]
|
|
100
|
+
logging_level = console_handler.level
|
|
101
|
+
|
|
88
102
|
if logging_level <= logging.WARN:
|
|
89
103
|
CONFIG["__CUCU_WROTE_TO_OUTPUT"] = True
|
|
90
104
|
|
cucu/page_checks.py
CHANGED
|
@@ -52,7 +52,7 @@ def init_page_checks():
|
|
|
52
52
|
# lets print the image outerHTML so its easier to identify
|
|
53
53
|
for broken_image in broken_images:
|
|
54
54
|
html = broken_image.get_attribute("outerHTML")
|
|
55
|
-
logger.
|
|
55
|
+
logger.warning(f"broken image found: {html}")
|
|
56
56
|
|
|
57
57
|
raise RuntimeError("broken images were found on the page")
|
|
58
58
|
else:
|
cucu/reporter/html.py
CHANGED
|
@@ -79,7 +79,7 @@ def generate(results, basepath, only_failures=False):
|
|
|
79
79
|
except Exception as exception:
|
|
80
80
|
if show_status:
|
|
81
81
|
print("") # add a newline before logger
|
|
82
|
-
logger.
|
|
82
|
+
logger.warning(
|
|
83
83
|
f"unable to read file {run_json_filepath}, got error: {exception}"
|
|
84
84
|
)
|
|
85
85
|
|
|
@@ -152,7 +152,7 @@ def generate(results, basepath, only_failures=False):
|
|
|
152
152
|
try:
|
|
153
153
|
CONFIG.load(scenario_configpath)
|
|
154
154
|
except Exception as e:
|
|
155
|
-
logger.
|
|
155
|
+
logger.warning(
|
|
156
156
|
f"Could not reload config: {scenario_configpath}: {e}"
|
|
157
157
|
)
|
|
158
158
|
else:
|
|
@@ -170,7 +170,7 @@ def generate(results, basepath, only_failures=False):
|
|
|
170
170
|
try:
|
|
171
171
|
sub_headers.append(handler(scenario))
|
|
172
172
|
except Exception:
|
|
173
|
-
logger.
|
|
173
|
+
logger.warning(
|
|
174
174
|
f"Exception while trying to run sub_headers hook for scenario: \"{scenario['name']}\"\n{traceback.format_exc()}"
|
|
175
175
|
)
|
|
176
176
|
scenario["sub_headers"] = "<br/>".join(sub_headers)
|
cucu/steps/table_steps.py
CHANGED
|
@@ -403,7 +403,7 @@ def wait_click_table_cell_matching_text(ctx, column, match_text, table):
|
|
|
403
403
|
By.XPATH, f'//td[.="{match_text}"]/parent::tr'
|
|
404
404
|
)
|
|
405
405
|
if len(row) > 1:
|
|
406
|
-
logger.
|
|
406
|
+
logger.warning(
|
|
407
407
|
f'Found {len(row)} rows with matching text "{match_text}", using the first row.'
|
|
408
408
|
)
|
|
409
409
|
cell = row[0].find_elements(By.CSS_SELECTOR, "td")[column]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cucu
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
4
4
|
Summary: Easy BDD web testing
|
|
5
5
|
Project-URL: Homepage, https://github.com/dominodatalab/cucu/wiki
|
|
6
6
|
Project-URL: Download, https://pypi.org/project/cucu/
|
|
@@ -25,20 +25,20 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
26
|
Classifier: Topic :: Software Development :: Testing :: BDD
|
|
27
27
|
Requires-Python: >=3.9
|
|
28
|
-
Requires-Dist: beautifulsoup4~=4.
|
|
28
|
+
Requires-Dist: beautifulsoup4~=4.13.3
|
|
29
29
|
Requires-Dist: behave~=1.2.6
|
|
30
30
|
Requires-Dist: chromedriver-autoinstaller~=0.6.2
|
|
31
31
|
Requires-Dist: click~=8.1.7
|
|
32
|
-
Requires-Dist: coverage[toml]~=7.
|
|
32
|
+
Requires-Dist: coverage[toml]~=7.6.12
|
|
33
33
|
Requires-Dist: geckodriver-autoinstaller~=0.1.0
|
|
34
|
-
Requires-Dist: humanize~=4.
|
|
35
|
-
Requires-Dist: importlib-metadata~=8.
|
|
34
|
+
Requires-Dist: humanize~=4.12.1
|
|
35
|
+
Requires-Dist: importlib-metadata~=8.6.1
|
|
36
36
|
Requires-Dist: ipdb~=0.13.13
|
|
37
37
|
Requires-Dist: jellyfish~=1.1.3
|
|
38
38
|
Requires-Dist: jinja2~=3.1.3
|
|
39
39
|
Requires-Dist: lsprotocol~=2023.0.1
|
|
40
40
|
Requires-Dist: mpire~=2.10.2
|
|
41
|
-
Requires-Dist: psutil
|
|
41
|
+
Requires-Dist: psutil>=6.0
|
|
42
42
|
Requires-Dist: pygls~=1.3.1
|
|
43
43
|
Requires-Dist: pyyaml~=6.0.1
|
|
44
44
|
Requires-Dist: requests<3.0.0,>=2.31.0
|
|
@@ -47,12 +47,17 @@ Requires-Dist: tabulate~=0.9.0
|
|
|
47
47
|
Requires-Dist: tenacity~=9.0.0
|
|
48
48
|
Description-Content-Type: text/markdown
|
|
49
49
|
|
|
50
|
+
[](https://pypi.org/project/cucu/)
|
|
51
|
+
[](https://spdx.org/licenses/BSD-3-Clause-Clear.html)
|
|
52
|
+
[](https://dl.circleci.com/status-badge/redirect/gh/dominodatalab/cucu/tree/main)
|
|
53
|
+
[](https://dominodatalab.github.io/cucu/coverage/badge)
|
|
54
|
+
|
|
55
|
+
|
|
50
56
|
#  **CUCU** - Easy BDD web testing <!-- omit from toc -->
|
|
51
57
|
|
|
52
58
|
End-to-end testing framework that uses [gherkin](https://cucumber.io/docs/gherkin/)
|
|
53
59
|
to drive various underlying tools/frameworks to create real world testing scenarios.
|
|
54
60
|
|
|
55
|
-
[](https://dl.circleci.com/status-badge/redirect/gh/dominodatalab/cucu/tree/main)
|
|
56
61
|
|
|
57
62
|
## Why cucu? <!-- omit from toc -->
|
|
58
63
|
1. Cucu avoids unnecessary abstractions (i.e. no Page Objects!) while keeping scenarios readable.
|
|
@@ -2,19 +2,19 @@ cucu/__init__.py,sha256=YtuajsJBj3_DgNoygHen9gKojeQF523Oc27kyCUzoG0,1013
|
|
|
2
2
|
cucu/ansi_parser.py,sha256=_yTlqr6KruLsqgWR6BkpJUC3bmlQy_9JbkuxFx6Jrbo,2213
|
|
3
3
|
cucu/behave_tweaks.py,sha256=dmq35BflbKw8LGsn-hH-Xnt0O9QM_mDznopaIdo0OF0,6578
|
|
4
4
|
cucu/config.py,sha256=12SXNtBSnD3N6K9DnCDYHZDA4_Wrh4g7whdgHDKSuPw,14022
|
|
5
|
-
cucu/environment.py,sha256=
|
|
5
|
+
cucu/environment.py,sha256=v52DqI7zAQZHaieKEK4rGFst6jYGwMtInNgleIBNF8Y,9430
|
|
6
6
|
cucu/helpers.py,sha256=l_YMmbuXjtBRo-MER-qe6soUIyjt0ey2BoSgWs4zYwA,36285
|
|
7
7
|
cucu/hooks.py,sha256=3Z1mavU42XMQ0DZ7lVWwTB-BJYHRyYUOzzOtmkdIsow,7117
|
|
8
|
-
cucu/logger.py,sha256=
|
|
9
|
-
cucu/page_checks.py,sha256=
|
|
8
|
+
cucu/logger.py,sha256=yj298l3KhvrSmgMoYghlHR2zb1uEvvxiKaLIJIrmj7U,3739
|
|
9
|
+
cucu/page_checks.py,sha256=CW1AqIxZ7rrLxpkf8nEFwcw6amnoN3Tb-acoN8dq3g0,2179
|
|
10
10
|
cucu/utils.py,sha256=608b28WVWgzmFMAMLXpFWeXe3NjRZEhpEfcTnYy2JRM,8611
|
|
11
11
|
cucu/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
cucu/browser/core.py,sha256=YAHhj6AMf7kpZR57thQaPHVHVHwnMBzCI0yofIYtfaY,2355
|
|
13
13
|
cucu/browser/frames.py,sha256=IW7kzRJn5PkbMaovIelAeCWO-T-2sOTwqaYBw-0-LKU,3545
|
|
14
|
-
cucu/browser/selenium.py,sha256=
|
|
14
|
+
cucu/browser/selenium.py,sha256=IOLzSyxNDUxEccc10qXV8hf817hNgUBRCHz1PbCEKhs,11605
|
|
15
15
|
cucu/browser/selenium_tweaks.py,sha256=oUIhWVhBZbc9qsmQUJMpIr9uUWKxtgZBcnySWU6Yttk,879
|
|
16
16
|
cucu/cli/__init__.py,sha256=uXX5yVG1konJ_INdlrcfMg-Tt_5_cSx29Ed8R8v908A,62
|
|
17
|
-
cucu/cli/core.py,sha256=
|
|
17
|
+
cucu/cli/core.py,sha256=0G0eN1aOtrp6RV5_kASfny4lwkCqmE0leiPCP4urhCc,24231
|
|
18
18
|
cucu/cli/run.py,sha256=e2JR77YF-7YSC4nCjogPcIsfoH7T43dAz5x_eeeue6k,5906
|
|
19
19
|
cucu/cli/steps.py,sha256=hxsLymlYvF0uqUkDVq3s6heABkYnRo_SdQCpBdpb0e0,4009
|
|
20
20
|
cucu/cli/thread_dumper.py,sha256=Z3XnYSxidx6pqjlQ7zu-TKMIYZWk4z9c5YLdPkcemiU,1593
|
|
@@ -25,7 +25,7 @@ cucu/external/jquery/jquery-3.5.1.min.js,sha256=9_aliU8dGd2tb6OSsuzixeV4y_faTqgF
|
|
|
25
25
|
cucu/formatter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
cucu/formatter/cucu.py,sha256=KAt3SeIqvjXqZ5wOaaAcqpODKawb8nRR6mvq3ubUMME,9163
|
|
27
27
|
cucu/formatter/json.py,sha256=BPmXkSpKFZo5b_6MCWva6WAQaQrr0NL5BTZ2SmOGBr8,10592
|
|
28
|
-
cucu/formatter/junit.py,sha256=
|
|
28
|
+
cucu/formatter/junit.py,sha256=aJ9dGLbamMH-wUi_msF66_-_c_YUq07-8_wCNEjUju4,10129
|
|
29
29
|
cucu/fuzzy/__init__.py,sha256=ce4JRmaBF6oab6U99Qbpt7DrD3elhH32__-ND6fw5xc,104
|
|
30
30
|
cucu/fuzzy/core.py,sha256=tmQKX_Ni-2ohoxzctRUg2x7zMeEW8MlJJmpU3PfTmvQ,3153
|
|
31
31
|
cucu/fuzzy/fuzzy.js,sha256=ee-TytISLyUo7cMAkuVI5qbLXdt0eoFWczTsoU4zYhg,11618
|
|
@@ -38,7 +38,7 @@ cucu/matcher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
38
38
|
cucu/matcher/core.py,sha256=o2j4NNGORZ0BtHEbBTeE2T_vi6EJlWVkrjOoS2L7UNk,1032
|
|
39
39
|
cucu/reporter/__init__.py,sha256=nS2lIp43gifspIDgieSS3dzBMvnKfd--O8Pb3RTr4yE,71
|
|
40
40
|
cucu/reporter/favicon.png,sha256=9ikXLAmzfQzy2NQps_8CGaZog2FvQrOX8nnSZ0e1UmM,2161
|
|
41
|
-
cucu/reporter/html.py,sha256=
|
|
41
|
+
cucu/reporter/html.py,sha256=a6Djq9xKP16OVQ0QADuoQGpUpfYU0TfFEmja7PjSs1Y,16344
|
|
42
42
|
cucu/reporter/external/bootstrap.min.css,sha256=eHMy9CG2IWZObUwZAkNVWc6DTIds3OavzUguDY0VsIo,163874
|
|
43
43
|
cucu/reporter/external/bootstrap.min.js,sha256=eZoFcnJ9Ooanw0yPsrZ3CHiXIYUBW-7_hNNqch50sLI,48945
|
|
44
44
|
cucu/reporter/external/dataTables.bootstrap.min.css,sha256=AVjWb9eSGQ0-3f4WNiVU1pfkyoNvthJdaw_IxK9Y2c0,10611
|
|
@@ -71,13 +71,13 @@ cucu/steps/platform_steps.py,sha256=G7HtBMhdRu58-2_LdXC5rkJM9F1ivGdlRa9BzTiHaaY,
|
|
|
71
71
|
cucu/steps/radio_steps.py,sha256=3NeEXK_Sd2J-qWM0_2togWKh52vxsJCbbH5G7fPo-Ng,5645
|
|
72
72
|
cucu/steps/step_utils.py,sha256=Chd0NQbMnfAEJmQkoVQRMbVRbCnJIBvVeH7CmXrCMm0,1417
|
|
73
73
|
cucu/steps/tab_steps.py,sha256=TVVytkihvJ2GYQ9bwAs1CVzb-twzUq11QONlEbd6uO0,1818
|
|
74
|
-
cucu/steps/table_steps.py,sha256=
|
|
74
|
+
cucu/steps/table_steps.py,sha256=L497X4SnUlHG26Tp4FaLMke6HdqF2yIPj5lL6rBxIaw,13724
|
|
75
75
|
cucu/steps/tables.js,sha256=Os2a7Fo-cg03XVli7USvcnBVad4N7idXr-HBuzdLvVQ,945
|
|
76
76
|
cucu/steps/text_steps.py,sha256=Jj_GHoHeemNwVdUOdqcehArNp7WM-WMjljA4w0pLXuw,2576
|
|
77
77
|
cucu/steps/variable_steps.py,sha256=WSctH3_xcxjijGPYZlxp-foC_SIAAKtF__saNtgZJbk,2966
|
|
78
78
|
cucu/steps/webserver_steps.py,sha256=wWkpSvcSMdiskPkh4cqlepWx1nkvEpTU2tRXQmPDbyo,1410
|
|
79
|
-
cucu-1.0.
|
|
80
|
-
cucu-1.0.
|
|
81
|
-
cucu-1.0.
|
|
82
|
-
cucu-1.0.
|
|
83
|
-
cucu-1.0.
|
|
79
|
+
cucu-1.0.12.dist-info/METADATA,sha256=1NicuG00A1oPa-JP1RgpgpAa-9kL4PBj0dgwiE_x0aQ,16533
|
|
80
|
+
cucu-1.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
81
|
+
cucu-1.0.12.dist-info/entry_points.txt,sha256=YEXTyEfIZbcV0GJ9R3Gfu3j6DcOJJK7_XHkJqE3Yiao,39
|
|
82
|
+
cucu-1.0.12.dist-info/licenses/LICENSE,sha256=WfgJYF9EaQoL_OeWr2Qd0MxhhFegDfzWSUmvDTwFxis,1721
|
|
83
|
+
cucu-1.0.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|