cucu 1.3.1__tar.gz → 1.3.3__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.
- {cucu-1.3.1 → cucu-1.3.3}/PKG-INFO +1 -1
- {cucu-1.3.1 → cucu-1.3.3}/pyproject.toml +1 -1
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/cli/core.py +6 -2
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/environment.py +23 -6
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/utils.py +6 -6
- {cucu-1.3.1 → cucu-1.3.3}/README.md +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/ansi_parser.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/behave_tweaks.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/browser/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/browser/core.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/browser/frames.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/browser/selenium.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/browser/selenium_tweaks.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/cli/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/cli/run.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/cli/steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/cli/thread_dumper.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/config.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/db.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/edgedriver_autoinstaller/README.md +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/edgedriver_autoinstaller/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/edgedriver_autoinstaller/utils.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/external/jquery/jquery-3.5.1.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/formatter/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/formatter/cucu.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/formatter/json.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/formatter/junit.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/fuzzy/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/fuzzy/core.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/fuzzy/fuzzy.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/helpers.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/hooks.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/.gitignore +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/README.md +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/cucurc.yml +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/data/www/example.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/cucurc.yml +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/environment.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/example.feature +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/lint_rules/sid.yaml +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/steps/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/init_data/features/steps/my_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/language_server/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/language_server/core.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/lint/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/lint/linter.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/lint/rules/format.yaml +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/logger.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/matcher/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/matcher/core.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/page_checks.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/bootstrap.min.css +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/bootstrap.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/dataTables.bootstrap.min.css +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/dataTables.bootstrap.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/jquery-3.5.1.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/jquery.dataTables.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/external/popper.min.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/favicon.png +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/html.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/templates/feature.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/templates/flat.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/templates/index.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/templates/layout.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/reporter/templates/scenario.html +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/__init__.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/base_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/browser_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/button_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/checkbox_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/command_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/draggable_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/dropdown_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/file_input_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/filesystem_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/flow_control_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/image_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/input_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/link_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/menuitem_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/platform_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/radio_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/section_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/step_utils.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/tab_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/table_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/tables.js +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/text_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/variable_steps.py +0 -0
- {cucu-1.3.1 → cucu-1.3.3}/src/cucu/steps/webserver_steps.py +0 -0
|
@@ -301,9 +301,13 @@ def run(
|
|
|
301
301
|
if record_env_vars:
|
|
302
302
|
os.environ["CUCU_RECORD_ENV_VARS"] = "true"
|
|
303
303
|
|
|
304
|
-
|
|
304
|
+
cucu_run_id_seed = f"{time.perf_counter()}_{os.getpid()}"
|
|
305
|
+
os.environ["CUCU_RUN_ID"] = CONFIG["CUCU_RUN_ID"] = generate_short_id(
|
|
306
|
+
cucu_run_id_seed
|
|
307
|
+
)
|
|
308
|
+
worker_id_seed = f"{CONFIG['CUCU_RUN_ID']}_{os.getpid()}"
|
|
305
309
|
os.environ["WORKER_PARENT_ID"] = CONFIG["WORKER_RUN_ID"] = (
|
|
306
|
-
generate_short_id()
|
|
310
|
+
generate_short_id(worker_id_seed)
|
|
307
311
|
)
|
|
308
312
|
if not dry_run:
|
|
309
313
|
create_run(results, filepath)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import json
|
|
3
|
+
import os
|
|
3
4
|
import sys
|
|
5
|
+
import time
|
|
4
6
|
import traceback
|
|
5
7
|
from functools import partial
|
|
6
8
|
from pathlib import Path
|
|
@@ -63,7 +65,9 @@ def before_all(ctx):
|
|
|
63
65
|
logger.debug(
|
|
64
66
|
"Create a new worker db since this isn't the parent process"
|
|
65
67
|
)
|
|
66
|
-
|
|
68
|
+
# use seed unique enough for multiple cucu_runs to be combined but predictable within the same run
|
|
69
|
+
worker_id_seed = f"{CONFIG['WORKER_PARENT_ID']}_{os.getpid()}"
|
|
70
|
+
CONFIG["WORKER_RUN_ID"] = generate_short_id(worker_id_seed)
|
|
67
71
|
|
|
68
72
|
results_path = Path(CONFIG["CUCU_RESULTS_DIR"])
|
|
69
73
|
worker_run_id = CONFIG["WORKER_RUN_ID"]
|
|
@@ -71,8 +75,12 @@ def before_all(ctx):
|
|
|
71
75
|
CONFIG["RUN_DB_PATH"] = run_db_path = (
|
|
72
76
|
results_path / f"run_{cucu_run_id}_{worker_run_id}.db"
|
|
73
77
|
)
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
if not run_db_path.exists():
|
|
79
|
+
logger.debug(
|
|
80
|
+
f"Creating new run database file: {run_db_path} for {worker_id_seed}"
|
|
81
|
+
)
|
|
82
|
+
create_database_file(run_db_path)
|
|
83
|
+
record_cucu_run()
|
|
76
84
|
|
|
77
85
|
CONFIG.snapshot("before_all")
|
|
78
86
|
|
|
@@ -91,7 +99,8 @@ def after_all(ctx):
|
|
|
91
99
|
|
|
92
100
|
|
|
93
101
|
def before_feature(ctx, feature):
|
|
94
|
-
|
|
102
|
+
feature_run_id_seed = f"{CONFIG['WORKER_RUN_ID']}_{time.perf_counter()}"
|
|
103
|
+
feature.feature_run_id = generate_short_id(feature_run_id_seed)
|
|
95
104
|
feature.custom_data = {}
|
|
96
105
|
record_feature(feature)
|
|
97
106
|
|
|
@@ -163,7 +172,12 @@ def before_scenario(ctx, scenario):
|
|
|
163
172
|
)
|
|
164
173
|
ctx.browser_log_tee = TeeStream(ctx.browser_log_file)
|
|
165
174
|
|
|
166
|
-
|
|
175
|
+
scenario_run_id_seed = (
|
|
176
|
+
f"{ctx.feature.feature_run_id}_{time.perf_counter()}"
|
|
177
|
+
)
|
|
178
|
+
CONFIG["SCENARIO_RUN_ID"] = scenario.scenario_run_id = generate_short_id(
|
|
179
|
+
scenario_run_id_seed
|
|
180
|
+
)
|
|
167
181
|
record_scenario(ctx)
|
|
168
182
|
|
|
169
183
|
# run before all scenario hooks
|
|
@@ -271,7 +285,10 @@ def cleanup_browsers(ctx):
|
|
|
271
285
|
|
|
272
286
|
|
|
273
287
|
def before_step(ctx, step):
|
|
274
|
-
|
|
288
|
+
step_run_id_seed = f"{ctx.scenario.scenario_run_id}_{ctx.step_index}_{time.perf_counter()}"
|
|
289
|
+
step.step_run_id = generate_short_id(
|
|
290
|
+
step_run_id_seed, length=10
|
|
291
|
+
) # up to 10 characters to give two orders of magnitude less chance of collision
|
|
275
292
|
step.start_at = datetime.datetime.now().isoformat()[:-3]
|
|
276
293
|
|
|
277
294
|
sys.stdout.captured()
|
|
@@ -43,14 +43,14 @@ class StopRetryException(Exception):
|
|
|
43
43
|
pass
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
def generate_short_id():
|
|
46
|
+
def generate_short_id(seed=None, length=7):
|
|
47
47
|
"""
|
|
48
|
-
Generate a short
|
|
49
|
-
Used for both cucu_run_id and scenario_run_id.
|
|
48
|
+
Generate a short character ID based on seed (defaults to current performance counter).
|
|
50
49
|
"""
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
if seed is None:
|
|
51
|
+
seed = time.perf_counter()
|
|
52
|
+
|
|
53
|
+
return hashlib.sha256(str(seed).encode("utf-8")).hexdigest()[:length]
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
def format_gherkin_table(table, headings=[], prefix=""):
|
|
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
|
|
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
|