cucu 1.1.1__tar.gz → 1.2.0__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.1.1 → cucu-1.2.0}/CHANGELOG.md +9 -0
- {cucu-1.1.1 → cucu-1.2.0}/PKG-INFO +54 -46
- {cucu-1.1.1 → cucu-1.2.0}/README.md +49 -33
- {cucu-1.1.1 → cucu-1.2.0}/pyproject.toml +16 -13
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/behave_tweaks.py +10 -2
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/cli/core.py +37 -1
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/cli/steps.py +4 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/formatter/cucu.py +4 -0
- cucu-1.2.0/src/cucu/init_data/.gitignore +5 -0
- cucu-1.2.0/src/cucu/init_data/README.md +63 -0
- cucu-1.2.0/src/cucu/init_data/cucurc.yml +10 -0
- cucu-1.2.0/src/cucu/init_data/data/www/example.html +27 -0
- cucu-1.2.0/src/cucu/init_data/features/cucurc.yml +9 -0
- cucu-1.2.0/src/cucu/init_data/features/environment.py +90 -0
- cucu-1.2.0/src/cucu/init_data/features/example.feature +18 -0
- cucu-1.2.0/src/cucu/init_data/features/lint_rules/sid.yaml +29 -0
- cucu-1.2.0/src/cucu/init_data/features/steps/__init__.py +7 -0
- cucu-1.2.0/src/cucu/init_data/features/steps/my_steps.py +26 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/lint/rules/format.yaml +9 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/html.py +6 -1
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/templates/layout.html +35 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/__init__.py +1 -1
- cucu-1.2.0/src/cucu/steps/section_steps.py +25 -0
- cucu-1.1.1/.circleci/config.yml +0 -259
- cucu-1.1.1/.env +0 -1
- cucu-1.1.1/.github/CODEOWNERS +0 -2
- cucu-1.1.1/.github/PULL_REQUEST_TEMPLATE.md +0 -25
- cucu-1.1.1/.github/workflows/build.yml +0 -126
- cucu-1.1.1/.github/workflows/create_a_new_release.yml +0 -45
- cucu-1.1.1/.github/workflows/publish-production.yml +0 -31
- cucu-1.1.1/.github/workflows/publish-test.yml +0 -35
- cucu-1.1.1/.pre-commit-config.yaml +0 -21
- cucu-1.1.1/.python-version +0 -1
- cucu-1.1.1/CODE_OF_CONDUCT.md +0 -39
- cucu-1.1.1/CONTRIBUTING.md +0 -231
- cucu-1.1.1/CONTRIBUTORS.md +0 -19
- cucu-1.1.1/Makefile +0 -70
- cucu-1.1.1/bin/cucu +0 -2
- cucu-1.1.1/bin/start_seleniarm_hub.sh +0 -16
- cucu-1.1.1/bin/start_selenium_hub.sh +0 -17
- cucu-1.1.1/cortex.yaml +0 -18
- cucu-1.1.1/data/features/custom_step_test/custom_step.feature +0 -4
- cucu-1.1.1/data/features/custom_step_test/steps/__init__.py +0 -2
- cucu-1.1.1/data/features/custom_step_test/steps/cucu_steps.py +0 -6
- cucu-1.1.1/data/features/echo.feature +0 -20
- cucu-1.1.1/data/features/environment.py +0 -2
- cucu-1.1.1/data/features/feature_skipping_scenarios_by_file_presence.feature +0 -9
- cucu-1.1.1/data/features/feature_with_background.feature +0 -11
- cucu-1.1.1/data/features/feature_with_background_using_substeps.feature +0 -8
- cucu-1.1.1/data/features/feature_with_failing_scenario.feature +0 -5
- cucu-1.1.1/data/features/feature_with_failing_scenario_with_table.feature +0 -8
- cucu-1.1.1/data/features/feature_with_failing_scenario_with_web.feature +0 -7
- cucu-1.1.1/data/features/feature_with_logging.feature +0 -6
- cucu-1.1.1/data/features/feature_with_long_names.feature +0 -5
- cucu-1.1.1/data/features/feature_with_mixed_results.feature +0 -28
- cucu-1.1.1/data/features/feature_with_multilines_and_tables.feature +0 -18
- cucu-1.1.1/data/features/feature_with_passing_scenario.feature +0 -5
- cucu-1.1.1/data/features/feature_with_passing_scenario_with_web.feature +0 -6
- cucu-1.1.1/data/features/feature_with_platform_specific_scenarios.feature +0 -9
- cucu-1.1.1/data/features/feature_with_scenario_outline.feature +0 -9
- cucu-1.1.1/data/features/feature_with_scenario_using_nth_type.feature +0 -4
- cucu-1.1.1/data/features/feature_with_tagging.feature +0 -14
- cucu-1.1.1/data/features/feature_with_xml_tags.feature +0 -4
- cucu-1.1.1/data/features/multiple_scenarios_with_browser_steps.feature +0 -11
- cucu-1.1.1/data/features/scenario_stop_retry_early.feature +0 -6
- cucu-1.1.1/data/features/scenario_that_fails_with_after_scenario_steps.feature +0 -14
- cucu-1.1.1/data/features/scenario_that_passes_with_after_scenario_steps.feature +0 -13
- cucu-1.1.1/data/features/scenario_with_console_logs.feature +0 -10
- cucu-1.1.1/data/features/scenario_with_substeps.feature +0 -5
- cucu-1.1.1/data/features/scenario_with_substeps_and_logging.feature +0 -5
- cucu-1.1.1/data/features/slow_features/slow_feature1.feature +0 -4
- cucu-1.1.1/data/features/slow_features/slow_feature2.feature +0 -4
- cucu-1.1.1/data/features/slow_features/slow_feature3.feature +0 -4
- cucu-1.1.1/data/features/slow_features/slow_feature4.feature +0 -4
- cucu-1.1.1/data/features/slow_features/slow_feature5.feature +0 -4
- cucu-1.1.1/data/features/steps/__init__.py +0 -1
- cucu-1.1.1/data/features/steps/cucu_steps.py +0 -91
- cucu-1.1.1/data/features/tagged_features/tagged_feature1.feature +0 -6
- cucu-1.1.1/data/features/tagged_features/tagged_feature2.feature +0 -6
- cucu-1.1.1/data/features/tagged_features/tagged_feature3.feature +0 -6
- cucu-1.1.1/data/features/with_secret/cucurc.yml +0 -1
- cucu-1.1.1/data/features/with_secret/scenario_with_comments.feature +0 -28
- cucu-1.1.1/data/unit/ansi.log +0 -76
- cucu-1.1.1/data/unit/ansi.log.html +0 -88
- cucu-1.1.1/data/www/broken_images.html +0 -9
- cucu-1.1.1/data/www/buttons.html +0 -34
- cucu-1.1.1/data/www/checkboxes.html +0 -111
- cucu-1.1.1/data/www/clipboard.html +0 -39
- cucu-1.1.1/data/www/comboboxes.html +0 -533
- cucu-1.1.1/data/www/console_logging.html +0 -14
- cucu-1.1.1/data/www/cookies.html +0 -12
- cucu-1.1.1/data/www/counter.html +0 -18
- cucu-1.1.1/data/www/drag_drop.html +0 -89
- cucu-1.1.1/data/www/draggables.html +0 -53
- cucu-1.1.1/data/www/dropdowns.html +0 -27
- cucu-1.1.1/data/www/duplicate_buttons.html +0 -24
- cucu-1.1.1/data/www/duplicate_inputs.html +0 -23
- cucu-1.1.1/data/www/dynamic_dropdown.html +0 -46
- cucu-1.1.1/data/www/file.txt +0 -1
- cucu-1.1.1/data/www/files.html +0 -14
- cucu-1.1.1/data/www/frames.html +0 -22
- cucu-1.1.1/data/www/fuzzy_rules.html +0 -63
- cucu-1.1.1/data/www/images.html +0 -8
- cucu-1.1.1/data/www/inputs.html +0 -45
- cucu-1.1.1/data/www/js/util.js +0 -20
- cucu-1.1.1/data/www/links.html +0 -30
- cucu-1.1.1/data/www/nothing_to_see_here.html +0 -8
- cucu-1.1.1/data/www/page_that_loads_forever.html +0 -14
- cucu-1.1.1/data/www/radio_buttons.html +0 -33
- cucu-1.1.1/data/www/stars.png +0 -0
- cucu-1.1.1/data/www/tables.html +0 -151
- cucu-1.1.1/data/www/tabs.html +0 -312
- cucu-1.1.1/data/www/text.html +0 -23
- cucu-1.1.1/features/browser/browser_tab_managemenet.feature +0 -36
- cucu-1.1.1/features/browser/browser_window_managemenet.feature +0 -82
- cucu-1.1.1/features/browser/buttons.feature +0 -120
- cucu-1.1.1/features/browser/checkboxes.feature +0 -38
- cucu-1.1.1/features/browser/clipboard.feature +0 -26
- cucu-1.1.1/features/browser/comboboxes.feature +0 -22
- cucu-1.1.1/features/browser/console_logs.feature +0 -22
- cucu-1.1.1/features/browser/cookies.feature +0 -18
- cucu-1.1.1/features/browser/draggables.feature +0 -36
- cucu-1.1.1/features/browser/dropdowns.feature +0 -50
- cucu-1.1.1/features/browser/duplicate_buttons.feature +0 -38
- cucu-1.1.1/features/browser/duplicate_draggables.feature +0 -34
- cucu-1.1.1/features/browser/duplicate_inputs.feature +0 -16
- cucu-1.1.1/features/browser/file_downloads.feature +0 -22
- cucu-1.1.1/features/browser/file_upload.feature +0 -17
- cucu-1.1.1/features/browser/frames.feature +0 -38
- cucu-1.1.1/features/browser/fuzzy_rules.feature +0 -25
- cucu-1.1.1/features/browser/helpers.feature +0 -61
- cucu-1.1.1/features/browser/images.feature +0 -17
- cucu-1.1.1/features/browser/inputs.feature +0 -193
- cucu-1.1.1/features/browser/inputs_limits.feature +0 -32
- cucu-1.1.1/features/browser/links.feature +0 -29
- cucu-1.1.1/features/browser/mht.feature +0 -59
- cucu-1.1.1/features/browser/page_checks.feature +0 -102
- cucu-1.1.1/features/browser/radio_buttons.feature +0 -39
- cucu-1.1.1/features/browser/tables.feature +0 -186
- cucu-1.1.1/features/browser/tabs.feature +0 -16
- cucu-1.1.1/features/browser/text.feature +0 -92
- cucu-1.1.1/features/cli/config.feature +0 -165
- cucu-1.1.1/features/cli/debug.feature +0 -16
- cucu-1.1.1/features/cli/help.feature +0 -26
- cucu-1.1.1/features/cli/internals.feature +0 -113
- cucu-1.1.1/features/cli/lint.feature +0 -441
- cucu-1.1.1/features/cli/lsp.feature +0 -11
- cucu-1.1.1/features/cli/report_basics.feature +0 -340
- cucu-1.1.1/features/cli/report_search_and_sorting.feature +0 -69
- cucu-1.1.1/features/cli/report_with_custom_failure_handler.feature +0 -98
- cucu-1.1.1/features/cli/report_with_custom_subheader.feature +0 -69
- cucu-1.1.1/features/cli/report_with_custom_tags.feature +0 -81
- cucu-1.1.1/features/cli/run.feature +0 -112
- cucu-1.1.1/features/cli/run_outputs.feature +0 -253
- cucu-1.1.1/features/cli/run_with_hooks.feature +0 -343
- cucu-1.1.1/features/cli/run_with_junit.feature +0 -40
- cucu-1.1.1/features/cli/run_with_logging.feature +0 -46
- cucu-1.1.1/features/cli/run_with_report.feature +0 -29
- cucu-1.1.1/features/cli/run_with_tags.feature +0 -55
- cucu-1.1.1/features/cli/run_with_thread_dumper.feature +0 -25
- cucu-1.1.1/features/cli/run_with_workers.feature +0 -51
- cucu-1.1.1/features/cli/secrets.feature +0 -181
- cucu-1.1.1/features/cli/steps.feature +0 -59
- cucu-1.1.1/features/cli/vars.feature +0 -135
- cucu-1.1.1/features/environment.py +0 -31
- cucu-1.1.1/features/flow_control/before_retry_handlers.feature +0 -52
- cucu-1.1.1/features/flow_control/repeating_steps.feature +0 -29
- cucu-1.1.1/features/flow_control/run_after_scenario_steps.feature +0 -11
- cucu-1.1.1/features/flow_control/run_and_measure.feature +0 -86
- cucu-1.1.1/features/flow_control/run_other_features.feature +0 -12
- cucu-1.1.1/features/flow_control/run_scenarios_conditionally.feature +0 -55
- cucu-1.1.1/features/flow_control/run_steps_conditionally.feature +0 -60
- cucu-1.1.1/features/flow_control/run_steps_on_element_visibilty.feature +0 -39
- cucu-1.1.1/features/flow_control/wait_for_steps.feature +0 -76
- cucu-1.1.1/features/os/command_steps.feature +0 -64
- cucu-1.1.1/features/os/file_steps.feature +0 -24
- cucu-1.1.1/features/os/platform_steps.feature +0 -15
- cucu-1.1.1/features/os/screenshot.feature +0 -10
- cucu-1.1.1/features/os/variables.feature +0 -32
- cucu-1.1.1/features/steps/__init__.py +0 -2
- cucu-1.1.1/features/steps/cucu_steps.py +0 -17
- cucu-1.1.1/logo.png +0 -0
- cucu-1.1.1/renovate.json +0 -47
- cucu-1.1.1/sonar-project.properties +0 -6
- cucu-1.1.1/src/cucu/steps/comment_steps.py +0 -17
- cucu-1.1.1/tests/__init__.py +0 -0
- cucu-1.1.1/tests/test_behave_tweaks.py +0 -28
- cucu-1.1.1/tests/test_browser.py +0 -25
- cucu-1.1.1/tests/test_config.py +0 -133
- cucu-1.1.1/tests/test_core.py +0 -33
- cucu-1.1.1/tests/test_language_server.py +0 -32
- cucu-1.1.1/tests/test_reporter_parser.py +0 -12
- cucu-1.1.1/tests/test_table_steps.py +0 -55
- cucu-1.1.1/uv.lock +0 -1057
- {cucu-1.1.1 → cucu-1.2.0}/.gitignore +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/LICENSE +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/ansi_parser.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/browser/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/browser/core.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/browser/frames.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/browser/selenium.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/browser/selenium_tweaks.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/cli/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/cli/run.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/cli/thread_dumper.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/config.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/edgedriver_autoinstaller/README.md +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/edgedriver_autoinstaller/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/edgedriver_autoinstaller/utils.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/environment.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/external/jquery/jquery-3.5.1.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/formatter/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/formatter/json.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/formatter/junit.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/fuzzy/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/fuzzy/core.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/fuzzy/fuzzy.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/helpers.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/hooks.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/language_server/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/language_server/core.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/lint/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/lint/linter.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/logger.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/matcher/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/matcher/core.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/page_checks.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/__init__.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/bootstrap.min.css +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/bootstrap.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/dataTables.bootstrap.min.css +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/dataTables.bootstrap.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/jquery-3.5.1.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/jquery.dataTables.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/external/popper.min.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/favicon.png +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/templates/feature.html +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/templates/flat.html +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/templates/index.html +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/reporter/templates/scenario.html +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/base_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/browser_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/button_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/checkbox_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/command_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/draggable_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/dropdown_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/file_input_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/filesystem_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/flow_control_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/image_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/input_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/link_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/menuitem_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/platform_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/radio_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/step_utils.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/tab_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/table_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/tables.js +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/text_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/variable_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/steps/webserver_steps.py +0 -0
- {cucu-1.1.1 → cucu-1.2.0}/src/cucu/utils.py +0 -0
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 1.2.0
|
|
9
|
+
- Add - levels 2-4 to section step
|
|
10
|
+
- Change - rename comment step to section step
|
|
11
|
+
- Add - linting for section step
|
|
12
|
+
- Change - min python to 3.10
|
|
13
|
+
|
|
14
|
+
## 1.1.2
|
|
15
|
+
- Add - `cucu init` command to setup new projects
|
|
16
|
+
|
|
8
17
|
## 1.1.1
|
|
9
18
|
- Chore - bump coverage lib from 7.6.12 to 7.8.0
|
|
10
19
|
- Chore - change CI to not use experimental COVERAGE_CORE=sysmon
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cucu
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
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/
|
|
@@ -16,24 +16,16 @@ Classifier: Intended Audience :: Developers
|
|
|
16
16
|
Classifier: License :: OSI Approved :: BSD License
|
|
17
17
|
Classifier: Natural Language :: English
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
|
-
Classifier: Programming Language :: Python
|
|
20
|
-
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
27
19
|
Classifier: Topic :: Software Development :: Testing :: BDD
|
|
28
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.10
|
|
29
21
|
Requires-Dist: beautifulsoup4~=4.13.3
|
|
30
|
-
Requires-Dist: behave
|
|
22
|
+
Requires-Dist: behave==1.2.6
|
|
31
23
|
Requires-Dist: chromedriver-autoinstaller~=0.6.2
|
|
32
|
-
Requires-Dist: click~=8.
|
|
24
|
+
Requires-Dist: click~=8.2.0
|
|
33
25
|
Requires-Dist: coverage[toml]~=7.8
|
|
34
26
|
Requires-Dist: geckodriver-autoinstaller~=0.1.0
|
|
35
27
|
Requires-Dist: humanize~=4.12.1
|
|
36
|
-
Requires-Dist: importlib-metadata~=8.
|
|
28
|
+
Requires-Dist: importlib-metadata~=8.7.0
|
|
37
29
|
Requires-Dist: jellyfish>=1.1
|
|
38
30
|
Requires-Dist: jinja2~=3.1.3
|
|
39
31
|
Requires-Dist: lsprotocol~=2023.0.1
|
|
@@ -90,8 +82,9 @@ to drive various underlying tools/frameworks to create real world testing scenar
|
|
|
90
82
|
|
|
91
83
|
- [Installation](#installation)
|
|
92
84
|
- [Requirements](#requirements)
|
|
93
|
-
- [
|
|
94
|
-
- [Usage](#usage)
|
|
85
|
+
- [Setup](#setup)
|
|
86
|
+
- [Usage](#usage)
|
|
87
|
+
- [Usage](#usage-1)
|
|
95
88
|
- [Cucu Run](#cucu-run)
|
|
96
89
|
- [Run specific browser version with docker](#run-specific-browser-version-with-docker)
|
|
97
90
|
- [Extending Cucu](#extending-cucu)
|
|
@@ -103,40 +96,55 @@ to drive various underlying tools/frameworks to create real world testing scenar
|
|
|
103
96
|
- [Install From Build](#install-from-build)
|
|
104
97
|
|
|
105
98
|
# Installation
|
|
99
|
+
Let's get your repo to start using the cucu framework!
|
|
100
|
+
> [!NOTE] If you're not using uv, then just
|
|
101
|
+
> `pip install cucu` for your repo
|
|
102
|
+
|
|
106
103
|
## Requirements
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
1. Docker (for UI testing)
|
|
105
|
+
2. The [uv](https://docs.astral.sh/uv/) tool
|
|
106
|
+
3. A repo in a clean state
|
|
110
107
|
|
|
111
|
-
##
|
|
112
|
-
|
|
108
|
+
## Setup
|
|
109
|
+
> [!NOTE] Always run cucu from your repo root folder
|
|
113
110
|
|
|
114
|
-
1.
|
|
115
|
-
2.
|
|
111
|
+
1. Have docker running (don't need it right now, but why not get ready for testing)
|
|
112
|
+
2. Make sure you have no files to commit and a clean working tree
|
|
116
113
|
```
|
|
117
|
-
|
|
114
|
+
git status
|
|
118
115
|
```
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
Should report: `nothing to commit, working tree clean`
|
|
117
|
+
|
|
118
|
+
3. Add [cucu](https://pypi.org/project/cucu/) to your project and activate your venv
|
|
119
|
+
```
|
|
120
|
+
uv add cucu --dev
|
|
121
|
+
source .venv/bin/activate
|
|
122
|
+
```
|
|
123
|
+
4. Initialize cucu (copies the `init_data` folder to your repo)
|
|
124
|
+
```
|
|
125
|
+
cucu init
|
|
126
|
+
```
|
|
127
|
+
5. Manually resolve any file conflicts
|
|
128
|
+
```
|
|
129
|
+
git status
|
|
130
|
+
```
|
|
131
|
+
6. Run the example tests
|
|
132
|
+
```
|
|
133
|
+
cucu run features
|
|
134
|
+
```
|
|
135
|
+
7. Done! But there is more optional stuff you can do, like:
|
|
136
|
+
1. Run with `--no-headless` mode to see the browser interaction
|
|
137
|
+
2. Run with `--generate-report` (or `-g`) to generate the html **report/** folder
|
|
138
|
+
3. Reference the exact test (i.e. scenario) with `features/example.feature:8` instead of using the `features` folder
|
|
139
|
+
```
|
|
140
|
+
cucu run features/example.feature:8 -g --no-headless
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Usage
|
|
144
|
+
> [!Note] Cucu needs to be run from your **repo root** (i.e. the parent of the `features` folder)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
1. list available cucu steps
|
|
140
148
|
```bash
|
|
141
149
|
cucu steps
|
|
142
150
|
```
|
|
@@ -145,7 +153,7 @@ _Get your repo setup using cucu as a test framework_
|
|
|
145
153
|
cucu steps | fzf
|
|
146
154
|
# start typing for search
|
|
147
155
|
```
|
|
148
|
-
|
|
156
|
+
2. **create your first cucu test**
|
|
149
157
|
- features/my_first_test.feature
|
|
150
158
|
```gherkin
|
|
151
159
|
Feature: My First Cucu Test
|
|
@@ -157,7 +165,7 @@ _Get your repo setup using cucu as a test framework_
|
|
|
157
165
|
And I click the button "Google Search"
|
|
158
166
|
Then I wait to see the text "results"
|
|
159
167
|
```
|
|
160
|
-
|
|
168
|
+
3. **run it**
|
|
161
169
|
```bash
|
|
162
170
|
cucu run features/my_first_test.feature
|
|
163
171
|
```
|
|
@@ -41,8 +41,9 @@ to drive various underlying tools/frameworks to create real world testing scenar
|
|
|
41
41
|
|
|
42
42
|
- [Installation](#installation)
|
|
43
43
|
- [Requirements](#requirements)
|
|
44
|
-
- [
|
|
45
|
-
- [Usage](#usage)
|
|
44
|
+
- [Setup](#setup)
|
|
45
|
+
- [Usage](#usage)
|
|
46
|
+
- [Usage](#usage-1)
|
|
46
47
|
- [Cucu Run](#cucu-run)
|
|
47
48
|
- [Run specific browser version with docker](#run-specific-browser-version-with-docker)
|
|
48
49
|
- [Extending Cucu](#extending-cucu)
|
|
@@ -54,40 +55,55 @@ to drive various underlying tools/frameworks to create real world testing scenar
|
|
|
54
55
|
- [Install From Build](#install-from-build)
|
|
55
56
|
|
|
56
57
|
# Installation
|
|
58
|
+
Let's get your repo to start using the cucu framework!
|
|
59
|
+
> [!NOTE] If you're not using uv, then just
|
|
60
|
+
> `pip install cucu` for your repo
|
|
61
|
+
|
|
57
62
|
## Requirements
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
1. Docker (for UI testing)
|
|
64
|
+
2. The [uv](https://docs.astral.sh/uv/) tool
|
|
65
|
+
3. A repo in a clean state
|
|
61
66
|
|
|
62
|
-
##
|
|
63
|
-
|
|
67
|
+
## Setup
|
|
68
|
+
> [!NOTE] Always run cucu from your repo root folder
|
|
64
69
|
|
|
65
|
-
1.
|
|
66
|
-
2.
|
|
70
|
+
1. Have docker running (don't need it right now, but why not get ready for testing)
|
|
71
|
+
2. Make sure you have no files to commit and a clean working tree
|
|
67
72
|
```
|
|
68
|
-
|
|
73
|
+
git status
|
|
69
74
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
Should report: `nothing to commit, working tree clean`
|
|
76
|
+
|
|
77
|
+
3. Add [cucu](https://pypi.org/project/cucu/) to your project and activate your venv
|
|
78
|
+
```
|
|
79
|
+
uv add cucu --dev
|
|
80
|
+
source .venv/bin/activate
|
|
81
|
+
```
|
|
82
|
+
4. Initialize cucu (copies the `init_data` folder to your repo)
|
|
83
|
+
```
|
|
84
|
+
cucu init
|
|
85
|
+
```
|
|
86
|
+
5. Manually resolve any file conflicts
|
|
87
|
+
```
|
|
88
|
+
git status
|
|
89
|
+
```
|
|
90
|
+
6. Run the example tests
|
|
91
|
+
```
|
|
92
|
+
cucu run features
|
|
93
|
+
```
|
|
94
|
+
7. Done! But there is more optional stuff you can do, like:
|
|
95
|
+
1. Run with `--no-headless` mode to see the browser interaction
|
|
96
|
+
2. Run with `--generate-report` (or `-g`) to generate the html **report/** folder
|
|
97
|
+
3. Reference the exact test (i.e. scenario) with `features/example.feature:8` instead of using the `features` folder
|
|
98
|
+
```
|
|
99
|
+
cucu run features/example.feature:8 -g --no-headless
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Usage
|
|
103
|
+
> [!Note] Cucu needs to be run from your **repo root** (i.e. the parent of the `features` folder)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
1. list available cucu steps
|
|
91
107
|
```bash
|
|
92
108
|
cucu steps
|
|
93
109
|
```
|
|
@@ -96,7 +112,7 @@ _Get your repo setup using cucu as a test framework_
|
|
|
96
112
|
cucu steps | fzf
|
|
97
113
|
# start typing for search
|
|
98
114
|
```
|
|
99
|
-
|
|
115
|
+
2. **create your first cucu test**
|
|
100
116
|
- features/my_first_test.feature
|
|
101
117
|
```gherkin
|
|
102
118
|
Feature: My First Cucu Test
|
|
@@ -108,7 +124,7 @@ _Get your repo setup using cucu as a test framework_
|
|
|
108
124
|
And I click the button "Google Search"
|
|
109
125
|
Then I wait to see the text "results"
|
|
110
126
|
```
|
|
111
|
-
|
|
127
|
+
3. **run it**
|
|
112
128
|
```bash
|
|
113
129
|
cucu run features/my_first_test.feature
|
|
114
130
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cucu"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Easy BDD web testing"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "The Clear BSD License" }
|
|
@@ -27,30 +27,22 @@ classifiers = [
|
|
|
27
27
|
"License :: OSI Approved :: BSD License",
|
|
28
28
|
"Operating System :: OS Independent",
|
|
29
29
|
"Natural Language :: English",
|
|
30
|
-
"Programming Language :: Python",
|
|
31
|
-
"Programming Language :: Python :: 3",
|
|
32
|
-
"Programming Language :: Python :: 3.9",
|
|
33
|
-
"Programming Language :: Python :: 3.10",
|
|
34
|
-
"Programming Language :: Python :: 3.11",
|
|
35
|
-
"Programming Language :: Python :: 3.12",
|
|
36
|
-
"Programming Language :: Python :: 3.13",
|
|
37
|
-
"Programming Language :: Python :: 3 :: Only",
|
|
38
30
|
"Topic :: Software Development :: Testing :: BDD",
|
|
39
31
|
]
|
|
40
32
|
include = [
|
|
41
33
|
{ path = "CHANGELOG.md", format = "sdist" },
|
|
42
34
|
{ path = "LICENSE", format = "sdist" },
|
|
43
35
|
]
|
|
44
|
-
requires-python = ">=3.
|
|
36
|
+
requires-python = ">=3.10"
|
|
45
37
|
dependencies = [
|
|
46
38
|
"beautifulsoup4~=4.13.3",
|
|
47
|
-
"behave
|
|
39
|
+
"behave==1.2.6",
|
|
48
40
|
"chromedriver-autoinstaller~=0.6.2",
|
|
49
|
-
"click~=8.
|
|
41
|
+
"click~=8.2.0",
|
|
50
42
|
"coverage[toml]~=7.8",
|
|
51
43
|
"geckodriver-autoinstaller~=0.1.0",
|
|
52
44
|
"humanize~=4.12.1",
|
|
53
|
-
"importlib-metadata~=8.
|
|
45
|
+
"importlib-metadata~=8.7.0",
|
|
54
46
|
"jellyfish>=1.1",
|
|
55
47
|
"jinja2~=3.1.3",
|
|
56
48
|
"lsprotocol~=2023.0.1",
|
|
@@ -76,6 +68,17 @@ cucu = "cucu.cli:main"
|
|
|
76
68
|
requires = ["hatchling"]
|
|
77
69
|
build-backend = "hatchling.build"
|
|
78
70
|
|
|
71
|
+
[tool.hatch.build.targets.sdist]
|
|
72
|
+
include = [
|
|
73
|
+
"/src",
|
|
74
|
+
"/CHANGELOG.md",
|
|
75
|
+
]
|
|
76
|
+
exclude = [
|
|
77
|
+
"/data",
|
|
78
|
+
"/features",
|
|
79
|
+
"/tests",
|
|
80
|
+
]
|
|
81
|
+
|
|
79
82
|
[tool.uv]
|
|
80
83
|
dev-dependencies = [
|
|
81
84
|
"pre-commit>=3.8.0",
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
# writing while not interfering with the way behave does its own log
|
|
4
4
|
# capturing
|
|
5
5
|
#
|
|
6
|
+
import os
|
|
6
7
|
import sys
|
|
7
8
|
import warnings
|
|
8
9
|
from functools import wraps
|
|
9
10
|
|
|
11
|
+
# set env var BEHAVE_STRIP_STEPS_WITH_TRAILING_COLON=yes before importing behave
|
|
12
|
+
os.environ["BEHAVE_STRIP_STEPS_WITH_TRAILING_COLON"] = "yes"
|
|
13
|
+
|
|
10
14
|
import behave
|
|
11
15
|
from behave.__main__ import main as original_behave_main
|
|
12
16
|
from behave.model import Table
|
|
@@ -62,7 +66,9 @@ def init_step_hooks(stdout, stderr):
|
|
|
62
66
|
# resolve variables in the table values
|
|
63
67
|
if ctx.table is not None:
|
|
64
68
|
ctx.table.original = Table(
|
|
65
|
-
ctx.table.headings,
|
|
69
|
+
ctx.table.headings,
|
|
70
|
+
rows=ctx.table.rows,
|
|
71
|
+
line=ctx.table.line,
|
|
66
72
|
)
|
|
67
73
|
new_rows = []
|
|
68
74
|
for row in ctx.table.rows:
|
|
@@ -119,7 +125,9 @@ def init_step_hooks(stdout, stderr):
|
|
|
119
125
|
|
|
120
126
|
return wrapper
|
|
121
127
|
|
|
122
|
-
behave.__dict__[decorator_name] =
|
|
128
|
+
behave.__dict__[decorator_name.title()] = behave.__dict__[
|
|
129
|
+
decorator_name
|
|
130
|
+
] = new_decorator
|
|
123
131
|
|
|
124
132
|
|
|
125
133
|
_stdout = sys.stdout
|
|
@@ -8,6 +8,7 @@ import sys
|
|
|
8
8
|
import time
|
|
9
9
|
import xml.etree.ElementTree as ET
|
|
10
10
|
from importlib.metadata import version
|
|
11
|
+
from pathlib import Path
|
|
11
12
|
from threading import Timer
|
|
12
13
|
|
|
13
14
|
import click
|
|
@@ -468,7 +469,9 @@ def run(
|
|
|
468
469
|
time.sleep(1)
|
|
469
470
|
|
|
470
471
|
if timeout_reached:
|
|
471
|
-
logger.warning(
|
|
472
|
+
logger.warning(
|
|
473
|
+
"Timeout reached, send kill signal to workers"
|
|
474
|
+
)
|
|
472
475
|
kill_workers()
|
|
473
476
|
|
|
474
477
|
task_failed.update(async_results)
|
|
@@ -765,6 +768,39 @@ def vars(filepath):
|
|
|
765
768
|
print(tabulate(variables, tablefmt="fancy_grid"))
|
|
766
769
|
|
|
767
770
|
|
|
771
|
+
@main.command()
|
|
772
|
+
@click.argument("filepath", default="")
|
|
773
|
+
@click.option(
|
|
774
|
+
"-l",
|
|
775
|
+
"--logging-level",
|
|
776
|
+
default="INFO",
|
|
777
|
+
help="set logging level to one of debug, warn or info (default)",
|
|
778
|
+
)
|
|
779
|
+
def init(filepath, logging_level):
|
|
780
|
+
"""
|
|
781
|
+
initialize cucu in the current directory
|
|
782
|
+
|
|
783
|
+
Copies the `init_data` directory to the current directory
|
|
784
|
+
"""
|
|
785
|
+
os.environ["CUCU_LOGGING_LEVEL"] = logging_level.upper()
|
|
786
|
+
logger.init_logging(logging_level.upper())
|
|
787
|
+
|
|
788
|
+
init_data_dir = Path(__file__).parent.parent / "init_data"
|
|
789
|
+
|
|
790
|
+
logger.debug(f"cucu init: copy example directory from {init_data_dir=}")
|
|
791
|
+
repo_dir = filepath if filepath.strip() else os.path.join(os.getcwd())
|
|
792
|
+
|
|
793
|
+
features_dir = os.path.join(repo_dir, "features")
|
|
794
|
+
if os.path.exists(features_dir):
|
|
795
|
+
answer = input("Overwrite existing files? [y/N]:")
|
|
796
|
+
if answer.lower() != "y":
|
|
797
|
+
print("Aborted!")
|
|
798
|
+
return
|
|
799
|
+
|
|
800
|
+
shutil.copytree(init_data_dir, repo_dir, dirs_exist_ok=True)
|
|
801
|
+
print("You can now start writing your tests")
|
|
802
|
+
|
|
803
|
+
|
|
768
804
|
@main.command()
|
|
769
805
|
@click.option(
|
|
770
806
|
"-b",
|
|
@@ -47,6 +47,10 @@ def load_cucu_steps(filepath=None):
|
|
|
47
47
|
stdout = stdout.getvalue()
|
|
48
48
|
stderr = stderr.getvalue()
|
|
49
49
|
|
|
50
|
+
if stdout.startswith("USING RUNNER:"):
|
|
51
|
+
# remove the first line of the output so that linter won't error out trying to parse it as a step
|
|
52
|
+
stdout = "\n".join(stdout.split("\n")[1:])
|
|
53
|
+
|
|
50
54
|
if stdout.startswith("ParserError"):
|
|
51
55
|
print(stdout)
|
|
52
56
|
raise RuntimeError(
|
|
@@ -171,6 +171,10 @@ class CucuFormatter(Formatter):
|
|
|
171
171
|
text = self.colorize(
|
|
172
172
|
f"{indent}{prefix}{keyword} {step.name}\n", "cyan"
|
|
173
173
|
)
|
|
174
|
+
else:
|
|
175
|
+
text = self.colorize(
|
|
176
|
+
f"{indent}{prefix}{keyword} {step.name}\n", "yellow"
|
|
177
|
+
)
|
|
174
178
|
|
|
175
179
|
if self.monochrome:
|
|
176
180
|
self.stream.write(f"{text}")
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- your project readme here -->
|
|
2
|
+
|
|
3
|
+
# Development
|
|
4
|
+
## E2E tests
|
|
5
|
+
Use [cucu](https://pypi.org/project/cucu/) to run e2e-tests with the following:
|
|
6
|
+
1. make sure you're in the **repo root**
|
|
7
|
+
2. install the --dev dependecies
|
|
8
|
+
```sh
|
|
9
|
+
uv sync --dev
|
|
10
|
+
```
|
|
11
|
+
3. activate it
|
|
12
|
+
```sh
|
|
13
|
+
source .venv/bin/activate
|
|
14
|
+
```
|
|
15
|
+
4. run scenario
|
|
16
|
+
```sh
|
|
17
|
+
cucu run features
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Other helpful commands
|
|
21
|
+
|
|
22
|
+
- Show all steps
|
|
23
|
+
```sh
|
|
24
|
+
cucu steps
|
|
25
|
+
```
|
|
26
|
+
- Run scenario by tag
|
|
27
|
+
```sh
|
|
28
|
+
cucu run features --tag my_tag
|
|
29
|
+
```
|
|
30
|
+
- Run scenario by line number
|
|
31
|
+
```sh
|
|
32
|
+
cucu run features/example.feature:8
|
|
33
|
+
```
|
|
34
|
+
- Generate an html report
|
|
35
|
+
```sh
|
|
36
|
+
cucu report
|
|
37
|
+
```
|
|
38
|
+
- Run scenarios and generate report
|
|
39
|
+
```sh
|
|
40
|
+
cucu run features -g
|
|
41
|
+
```
|
|
42
|
+
- Lint your feature files!
|
|
43
|
+
_see `/features/lint_rules` for custom rules_
|
|
44
|
+
```sh
|
|
45
|
+
cucu lint
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Tagging Tests
|
|
49
|
+
|
|
50
|
+
> [!Note] This is just an example of how use tags
|
|
51
|
+
|
|
52
|
+
1. Tags are very important as they provide:
|
|
53
|
+
|
|
54
|
+
- Critical metadata for reporting and tracking
|
|
55
|
+
- Control where it runs in CI
|
|
56
|
+
- Filtering on what tests should run
|
|
57
|
+
|
|
58
|
+
2. They can be at the **Feature** file level or at the **Scenario** level.
|
|
59
|
+
|
|
60
|
+
3. Here's a list of some notable tags
|
|
61
|
+
| Tag | Gist | Example |
|
|
62
|
+
| --------- | ----------------------------------------------------------------------------------------------- | --------- |
|
|
63
|
+
| @sid-#### | **[Required]** The scenario (i.e. test case) id (numbers only) that is used to track and record | @sid-1234 |
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Don't check in this file! (I mean you could, but you probably don't want to)
|
|
2
|
+
|
|
3
|
+
# The config heirarchy starts with ~/.cucurc.yml, then this file, and down the folder tree.
|
|
4
|
+
# Use this file for local configuration per user
|
|
5
|
+
|
|
6
|
+
# This is just an example, normally you could have it as environment variables or pass it in the command line
|
|
7
|
+
MY_SECRET_USERNAME: "Bob"
|
|
8
|
+
MY_SECRET_PASSWORD: "123456"
|
|
9
|
+
|
|
10
|
+
SOME_OTHER_SECRET: "another secret"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>Some Example</title>
|
|
4
|
+
<script>
|
|
5
|
+
function update() {
|
|
6
|
+
document.querySelector("#my_status").textContent = "Welcome " + document.querySelector("#my_name").value + " !";
|
|
7
|
+
document.querySelector("#my_name").value = "";
|
|
8
|
+
document.querySelector("#my_key").value = "";
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
|
|
14
|
+
<h1>Some Example</h1>
|
|
15
|
+
<div id="my_status"></div>
|
|
16
|
+
<br/>
|
|
17
|
+
|
|
18
|
+
<div style="background: aliceblue;">Fake login box
|
|
19
|
+
<br/>
|
|
20
|
+
<label>username:</label><input id="my_name" type="text"></input>
|
|
21
|
+
<br/>
|
|
22
|
+
<label>The password here but use aria label to find</label><input aria-label="password" id="my_key" type="password"></input>
|
|
23
|
+
<br/>
|
|
24
|
+
<button onclick="update();">Login</button>
|
|
25
|
+
</div>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Checkin this file for the repo configuration
|
|
2
|
+
|
|
3
|
+
# CUCU_SECRETS is a comma-separated list of the names of the secrets (not the values)
|
|
4
|
+
CUCU_SECRETS: "MY_SECRET_PASSWORD,SOME_OTHER_SECRET"
|
|
5
|
+
|
|
6
|
+
CUCU_BROWSER_WINDOW_HEIGHT: 1080
|
|
7
|
+
CUCU_BROWSER_WINDOW_WIDTH: 1920
|
|
8
|
+
|
|
9
|
+
CUCU_BROKEN_IMAGES_PAGE_CHECK: false
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Define custom before/after hooks here
|
|
2
|
+
# Warn: Don't import this file into other python files to avoid duplicating hook registers
|
|
3
|
+
|
|
4
|
+
import datetime
|
|
5
|
+
|
|
6
|
+
from cucu import (
|
|
7
|
+
register_custom_scenario_subheader_in_report_handling,
|
|
8
|
+
register_custom_tags_in_report_handling,
|
|
9
|
+
)
|
|
10
|
+
from cucu.config import CONFIG
|
|
11
|
+
from cucu.environment import * # noqa
|
|
12
|
+
|
|
13
|
+
# point the `cucu lint` command to our own custom linting rules
|
|
14
|
+
CONFIG["CUCU_LINT_RULES_PATH"] = "features/lint_rules"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def make_scenario_id_clickable(tag):
|
|
18
|
+
"""Example of processing a tag to open up a link to some url"""
|
|
19
|
+
scenario_id = tag.replace(r"@sid-", "")
|
|
20
|
+
return f'<a href="https://localhost/index.php?/cases/view/{scenario_id}" target="_blank">{tag}</a>'
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
register_custom_tags_in_report_handling(r"@sid-.+", make_scenario_id_clickable)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def my_example_subheader(scenario):
|
|
27
|
+
"""Example of a custom subheader for the report
|
|
28
|
+
|
|
29
|
+
This may be useful if you want to link results to your log monitor system
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
query_time = ""
|
|
33
|
+
if (
|
|
34
|
+
"steps" in scenario
|
|
35
|
+
and len(scenario["steps"]) > 0
|
|
36
|
+
and "result" in scenario["steps"][0]
|
|
37
|
+
):
|
|
38
|
+
one_minute = datetime.timedelta(minutes=1)
|
|
39
|
+
# get start time from first step iso timestamp
|
|
40
|
+
start_datetime = (
|
|
41
|
+
datetime.datetime.fromisoformat(
|
|
42
|
+
scenario["steps"][0]["result"]["timestamp"]
|
|
43
|
+
)
|
|
44
|
+
- one_minute
|
|
45
|
+
)
|
|
46
|
+
epoc_start_time_ms = int(start_datetime.timestamp()) * 1000
|
|
47
|
+
|
|
48
|
+
end_datetime = start_datetime + (
|
|
49
|
+
one_minute * 30
|
|
50
|
+
) # default to start + 30 minutes
|
|
51
|
+
for step in reversed(scenario["steps"]):
|
|
52
|
+
if step.get("result", []) and step["result"].get(
|
|
53
|
+
"timestamp", None
|
|
54
|
+
):
|
|
55
|
+
end_duration = (
|
|
56
|
+
datetime.timedelta(
|
|
57
|
+
seconds=step["result"].get("duration", 0)
|
|
58
|
+
)
|
|
59
|
+
+ one_minute
|
|
60
|
+
)
|
|
61
|
+
end_datetime = (
|
|
62
|
+
datetime.datetime.fromisoformat(
|
|
63
|
+
step["result"]["timestamp"]
|
|
64
|
+
)
|
|
65
|
+
+ end_duration
|
|
66
|
+
)
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
epoc_end_time_ms = int(end_datetime.timestamp()) * 1000
|
|
70
|
+
query_time = f"&begin={epoc_start_time_ms}&end={epoc_end_time_ms}"
|
|
71
|
+
|
|
72
|
+
account_id = "123456"
|
|
73
|
+
result = ""
|
|
74
|
+
if account_id and query_time:
|
|
75
|
+
html = "<span>Log Monitoring System: "
|
|
76
|
+
html += f'<a href="https://localhost/logger?account={account_id}{query_time}" target="_blank">Link 🔗</a> '
|
|
77
|
+
result = html
|
|
78
|
+
|
|
79
|
+
return result
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
register_custom_scenario_subheader_in_report_handling(my_example_subheader)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# TODO:
|
|
86
|
+
# - add a register_page_check_hook # to ensure the page is loaded)
|
|
87
|
+
# - add a register_before_retry_hook # when using the retry decorator on steps)
|
|
88
|
+
# - add a register_custom_tags_in_report_handling
|
|
89
|
+
# - add a register_custom_scenario_subheader_in_report_handling
|
|
90
|
+
# - add a register_custom_variable_handling
|