cucu 1.3.4__tar.gz → 1.3.6__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 cucu might be problematic. Click here for more details.

Files changed (92) hide show
  1. {cucu-1.3.4 → cucu-1.3.6}/PKG-INFO +3 -3
  2. {cucu-1.3.4 → cucu-1.3.6}/pyproject.toml +2 -2
  3. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/cli/core.py +4 -24
  4. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/environment.py +17 -10
  5. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/html.py +0 -20
  6. {cucu-1.3.4 → cucu-1.3.6}/README.md +0 -0
  7. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/__init__.py +0 -0
  8. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/ansi_parser.py +0 -0
  9. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/behave_tweaks.py +0 -0
  10. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/browser/__init__.py +0 -0
  11. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/browser/core.py +0 -0
  12. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/browser/frames.py +0 -0
  13. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/browser/selenium.py +0 -0
  14. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/browser/selenium_tweaks.py +0 -0
  15. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/cli/__init__.py +0 -0
  16. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/cli/run.py +0 -0
  17. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/cli/steps.py +0 -0
  18. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/cli/thread_dumper.py +0 -0
  19. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/config.py +0 -0
  20. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/db.py +0 -0
  21. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/edgedriver_autoinstaller/README.md +0 -0
  22. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/edgedriver_autoinstaller/__init__.py +0 -0
  23. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/edgedriver_autoinstaller/utils.py +0 -0
  24. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/external/jquery/jquery-3.5.1.min.js +0 -0
  25. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/formatter/__init__.py +0 -0
  26. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/formatter/cucu.py +0 -0
  27. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/formatter/json.py +0 -0
  28. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/formatter/junit.py +0 -0
  29. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/fuzzy/__init__.py +0 -0
  30. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/fuzzy/core.py +0 -0
  31. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/fuzzy/fuzzy.js +0 -0
  32. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/helpers.py +0 -0
  33. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/hooks.py +0 -0
  34. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/.gitignore +0 -0
  35. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/README.md +0 -0
  36. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/cucurc.yml +0 -0
  37. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/data/www/example.html +0 -0
  38. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/cucurc.yml +0 -0
  39. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/environment.py +0 -0
  40. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/example.feature +0 -0
  41. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/lint_rules/sid.yaml +0 -0
  42. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/steps/__init__.py +0 -0
  43. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/init_data/features/steps/my_steps.py +0 -0
  44. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/language_server/__init__.py +0 -0
  45. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/language_server/core.py +0 -0
  46. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/lint/__init__.py +0 -0
  47. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/lint/linter.py +0 -0
  48. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/lint/rules/format.yaml +0 -0
  49. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/logger.py +0 -0
  50. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/matcher/__init__.py +0 -0
  51. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/matcher/core.py +0 -0
  52. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/page_checks.py +0 -0
  53. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/__init__.py +0 -0
  54. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/bootstrap.min.css +0 -0
  55. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/bootstrap.min.js +0 -0
  56. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/dataTables.bootstrap.min.css +0 -0
  57. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/dataTables.bootstrap.min.js +0 -0
  58. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/jquery-3.5.1.min.js +0 -0
  59. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/jquery.dataTables.min.js +0 -0
  60. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/external/popper.min.js +0 -0
  61. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/favicon.png +0 -0
  62. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/templates/feature.html +0 -0
  63. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/templates/flat.html +0 -0
  64. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/templates/index.html +0 -0
  65. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/templates/layout.html +0 -0
  66. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/reporter/templates/scenario.html +0 -0
  67. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/__init__.py +0 -0
  68. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/base_steps.py +0 -0
  69. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/browser_steps.py +0 -0
  70. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/button_steps.py +0 -0
  71. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/checkbox_steps.py +0 -0
  72. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/command_steps.py +0 -0
  73. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/draggable_steps.py +0 -0
  74. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/dropdown_steps.py +0 -0
  75. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/file_input_steps.py +0 -0
  76. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/filesystem_steps.py +0 -0
  77. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/flow_control_steps.py +0 -0
  78. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/image_steps.py +0 -0
  79. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/input_steps.py +0 -0
  80. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/link_steps.py +0 -0
  81. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/menuitem_steps.py +0 -0
  82. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/platform_steps.py +0 -0
  83. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/radio_steps.py +0 -0
  84. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/section_steps.py +0 -0
  85. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/step_utils.py +0 -0
  86. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/tab_steps.py +0 -0
  87. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/table_steps.py +0 -0
  88. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/tables.js +0 -0
  89. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/text_steps.py +0 -0
  90. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/variable_steps.py +0 -0
  91. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/steps/webserver_steps.py +0 -0
  92. {cucu-1.3.4 → cucu-1.3.6}/src/cucu/utils.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cucu
3
- Version: 1.3.4
3
+ Version: 1.3.6
4
4
  Summary: Easy BDD web testing
5
5
  Keywords: cucumber,selenium,behave
6
- Author: Domino Data Lab, Rodney Gomes, Cedric Young, Xin Dong, Kavya, Kevin Garton, Joy Liao
7
- Author-email: Domino Data Lab <open-source@dominodatalab.com>, Rodney Gomes <107359+rlgomes@users.noreply.github.com>, Cedric Young <4129217+ccedricyoung@users.noreply.github.com>, Xin Dong <104880864+ddl-xin@users.noreply.github.com>, Kavya <91882851+ddl-kavya@users.noreply.github.com>, Kevin Garton <71028750+ddl-kgarton@users.noreply.github.com>, Joy Liao <107583686+ddl-joy-liao@users.noreply.github.com>
6
+ Author: Domino Data Lab, Rodney Gomes, Cedric Young, Xin Dong, Kavya Yakkati, Kevin Garton, Joy Liao
7
+ Author-email: Domino Data Lab <open-source@dominodatalab.com>, Rodney Gomes <107359+rlgomes@users.noreply.github.com>, Cedric Young <4129217+ccedricyoung@users.noreply.github.com>, Xin Dong <104880864+ddl-xin@users.noreply.github.com>, Kavya Yakkati <91882851+ddl-kavya@users.noreply.github.com>, Kevin Garton <71028750+ddl-kgarton@users.noreply.github.com>, Joy Liao <107583686+ddl-joy-liao@users.noreply.github.com>
8
8
  License: The Clear BSD License
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Console
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cucu"
3
- version = "1.3.4"
3
+ version = "1.3.6"
4
4
  description = "Easy BDD web testing"
5
5
  readme = "README.md"
6
6
  license = { text = "The Clear BSD License" }
@@ -10,7 +10,7 @@ authors = [
10
10
  {name = "Rodney Gomes", email = "107359+rlgomes@users.noreply.github.com"},
11
11
  {name = "Cedric Young", email = "4129217+ccedricyoung@users.noreply.github.com"},
12
12
  {name = "Xin Dong", email = "104880864+ddl-xin@users.noreply.github.com"},
13
- {name = "Kavya", email = "91882851+ddl-kavya@users.noreply.github.com"},
13
+ {name = "Kavya Yakkati", email = "91882851+ddl-kavya@users.noreply.github.com"},
14
14
  {name = "Kevin Garton", email = "71028750+ddl-kgarton@users.noreply.github.com"},
15
15
  {name = "Joy Liao", email = "107583686+ddl-joy-liao@users.noreply.github.com"},
16
16
  ]
@@ -126,12 +126,6 @@ def main():
126
126
  is_flag=True,
127
127
  help="when set skips are shown",
128
128
  )
129
- @click.option(
130
- "--show-status",
131
- default=False,
132
- is_flag=True,
133
- help="when set status output is shown (helpful for CI that wants stdout updates)",
134
- )
135
129
  @click.option(
136
130
  "--periodic-thread-dumper",
137
131
  default=None,
@@ -233,7 +227,6 @@ def run(
233
227
  feature_timeout,
234
228
  secrets,
235
229
  show_skips,
236
- show_status,
237
230
  tags,
238
231
  selenium_remote_url,
239
232
  workers,
@@ -289,9 +282,6 @@ def run(
289
282
  if show_skips:
290
283
  os.environ["CUCU_SHOW_SKIPS"] = "true"
291
284
 
292
- if show_status:
293
- os.environ["CUCU_SHOW_STATUS"] = "true"
294
-
295
285
  if junit_with_stacktrace:
296
286
  os.environ["CUCU_JUNIT_WITH_STACKTRACE"] = "true"
297
287
 
@@ -566,7 +556,7 @@ def _add_report_path_in_junit(junit_folder, report_folder):
566
556
 
567
557
 
568
558
  @main.command()
569
- @click.argument("filepath", default="results")
559
+ @click.argument("results_dir", default="results")
570
560
  @click.option(
571
561
  "--only-failures",
572
562
  default=False,
@@ -585,12 +575,6 @@ def _add_report_path_in_junit(junit_folder, report_folder):
585
575
  is_flag=True,
586
576
  help="when set skips are shown",
587
577
  )
588
- @click.option(
589
- "--show-status",
590
- default=False,
591
- is_flag=True,
592
- help="when set status output is shown (helpful for CI that wants stdout updates)",
593
- )
594
578
  @click.option("-o", "--output", default="report")
595
579
  @click.option(
596
580
  "-j",
@@ -600,11 +584,10 @@ def _add_report_path_in_junit(junit_folder, report_folder):
600
584
  "the same location as --results",
601
585
  )
602
586
  def report(
603
- filepath,
587
+ results_dir,
604
588
  only_failures,
605
589
  logging_level,
606
590
  show_skips,
607
- show_status,
608
591
  output,
609
592
  junit,
610
593
  ):
@@ -619,10 +602,7 @@ def report(
619
602
  if show_skips:
620
603
  os.environ["CUCU_SHOW_SKIPS"] = "true"
621
604
 
622
- if show_status:
623
- os.environ["CUCU_SHOW_STATUS"] = "true"
624
-
625
- run_details_filepath = os.path.join(filepath, "run_details.json")
605
+ run_details_filepath = os.path.join(results_dir, "run_details.json")
626
606
 
627
607
  if os.path.exists(run_details_filepath):
628
608
  # load the run details at the time of execution for the provided results
@@ -636,7 +616,7 @@ def report(
636
616
  behave_init(run_details["filepath"])
637
617
 
638
618
  _generate_report(
639
- filepath, output, only_failures=only_failures, junit=junit
619
+ results_dir, output, only_failures=only_failures, junit=junit
640
620
  )
641
621
 
642
622
 
@@ -215,6 +215,23 @@ def after_scenario(ctx, scenario):
215
215
  for timer_name in ctx.step_timers:
216
216
  logger.warning(f'timer "{timer_name}" was never stopped/recorded')
217
217
 
218
+ browser_info = {"has_browser": False}
219
+
220
+ if len(ctx.browsers) != 0:
221
+ try:
222
+ tab_info = ctx.browser.get_tab_info()
223
+ all_tabs = ctx.browser.get_all_tabs_info()
224
+ browser_info = {
225
+ "has_browser": True,
226
+ "current_tab_index": tab_info["index"],
227
+ "all_tabs": all_tabs,
228
+ "browser_type": ctx.browser.driver.name,
229
+ }
230
+ except Exception as e:
231
+ logger.error(f"Error getting browser info: {e}")
232
+
233
+ scenario.browser_info = browser_info
234
+
218
235
  run_after_scenario_hook(ctx, scenario, download_mht_data)
219
236
 
220
237
  # run after all scenario hooks in 'lifo' order.
@@ -227,22 +244,12 @@ def after_scenario(ctx, scenario):
227
244
 
228
245
  CONFIG["__CUCU_AFTER_THIS_SCENARIO_HOOKS"] = []
229
246
 
230
- browser_info = {"has_browser": False}
231
247
  if CONFIG.true("CUCU_KEEP_BROWSER_ALIVE"):
232
248
  logger.debug("keeping browser alive between sessions")
233
249
  elif len(ctx.browsers) != 0:
234
- tab_info = ctx.browser.get_tab_info()
235
- all_tabs = ctx.browser.get_all_tabs_info()
236
- browser_info = {
237
- "current_tab_index": tab_info["index"],
238
- "all_tabs": all_tabs,
239
- "browser_type": ctx.browser.driver.name,
240
- }
241
-
242
250
  logger.debug("quitting browser between sessions")
243
251
  run_after_scenario_hook(ctx, scenario, cleanup_browsers)
244
252
 
245
- scenario.browser_info = browser_info
246
253
 
247
254
  cucu_config_path = ctx.scenario_logs_dir / "cucu.config.yaml.txt"
248
255
  with open(cucu_config_path, "w") as config_file:
@@ -61,8 +61,6 @@ def generate(results, basepath, only_failures=False):
61
61
  generate an HTML report for the results provided.
62
62
  """
63
63
 
64
- show_status = CONFIG["CUCU_SHOW_STATUS"] == "true"
65
-
66
64
  features = []
67
65
 
68
66
  run_json_filepaths = list(glob.iglob(os.path.join(results, "*run.json")))
@@ -74,11 +72,7 @@ def generate(results, basepath, only_failures=False):
74
72
  with open(run_json_filepath, "rb") as index_input:
75
73
  try:
76
74
  features += json.loads(index_input.read())
77
- if show_status:
78
- print("r", end="", flush=True)
79
75
  except Exception as exception:
80
- if show_status:
81
- print("") # add a newline before logger
82
76
  logger.warning(
83
77
  f"unable to read file {run_json_filepath}, got error: {exception}"
84
78
  )
@@ -102,8 +96,6 @@ def generate(results, basepath, only_failures=False):
102
96
  reported_features = []
103
97
  for feature in features:
104
98
  feature["folder_name"] = ellipsize_filename(feature["name"])
105
- if show_status:
106
- print("F", end="", flush=True)
107
99
  scenarios = []
108
100
 
109
101
  if feature["status"] != "untested" and "elements" in feature:
@@ -158,9 +150,6 @@ def generate(results, basepath, only_failures=False):
158
150
  else:
159
151
  logger.info(f"No config to reload: {scenario_configpath}")
160
152
 
161
- if show_status:
162
- print("S", end="", flush=True)
163
-
164
153
  process_tags(scenario)
165
154
 
166
155
  sub_headers = []
@@ -193,8 +182,6 @@ def generate(results, basepath, only_failures=False):
193
182
  step_index = 0
194
183
  scenario_started_at = None
195
184
  for step in scenario["steps"]:
196
- if show_status:
197
- print("s", end="", flush=True)
198
185
  total_steps += 1
199
186
  image_dir = get_step_image_dir(step_index, step["name"])
200
187
  image_dirpath = os.path.join(scenario_filepath, image_dir)
@@ -282,8 +269,6 @@ def generate(results, basepath, only_failures=False):
282
269
  if os.path.exists(logs_dir):
283
270
  log_files = []
284
271
  for log_file in glob.iglob(os.path.join(logs_dir, "*.*")):
285
- if show_status:
286
- print("l", end="", flush=True)
287
272
  log_filepath = log_file.removeprefix(
288
273
  f"{scenario_filepath}/"
289
274
  )
@@ -315,9 +300,6 @@ def generate(results, basepath, only_failures=False):
315
300
  for log_file in [
316
301
  x for x in log_files if ".console." in x["name"]
317
302
  ]:
318
- if show_status:
319
- print("c", end="", flush=True)
320
-
321
303
  log_file_filepath = os.path.join(
322
304
  scenario_filepath, "logs", log_file["name"]
323
305
  )
@@ -362,8 +344,6 @@ def generate(results, basepath, only_failures=False):
362
344
 
363
345
  package_loader = jinja2.PackageLoader("cucu.reporter", "templates")
364
346
  templates = jinja2.Environment(loader=package_loader) # nosec
365
- if show_status:
366
- print("") # add a newline to end status
367
347
 
368
348
  def urlencode(string):
369
349
  """
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes