Files
cleveragents-core/features/consolidated_main_modules.feature
freemo b2e923173f perf(tests): consolidate 141 trivially small feature files into 34 domain groups
Consolidate 141 BDD feature files that each complete in under 0.1 seconds
into 25 domain-grouped feature files, reducing subprocess count from 339
to ~223. Each consolidated file groups scenarios from the same domain/module
that share step definitions and fixtures. All scenarios are preserved with
clear comment headers indicating their original source file.

This reduces subprocess overhead by ~116 invocations (141 original files
replaced by 25 consolidated files), targeting the 42% of subprocess count
that contributed only 0.2% of actual test runtime.

ISSUES CLOSED: #485
2026-03-02 14:56:13 +00:00

74 lines
2.3 KiB
Gherkin

Feature: Consolidated Main Modules
Combined scenarios from: main_module, modules, scripts
# ============================================================
# Originally from: main_module.feature
# Feature: Main Module Entry Point
# ============================================================
Scenario: Run function returns success code
Given the CLI main function will return 0
When I call the run function
Then the run function should return 0
Scenario: Run function returns error code
Given the CLI main function will return 1
When I call the run function
Then the run function should return 1
Scenario: Run function handles exceptions
Given the CLI main function will raise an exception
When I call the run function expecting an exception
Then an exception should be raised
Scenario: Module has required attributes
When I import the __main__ module
Then the module should have a "run" attribute
And the "run" attribute should be callable
# ============================================================
# Originally from: modules.feature
# Feature: Module Entry Points
# ============================================================
Scenario: Run main module
When I execute the __main__ module
Then the CLI should start
Scenario: Import main module
When I import the __main__ module
Then it should have a run function
Scenario: Platform module imports CLI
When I call ensure_cli_importable
Then it should return the CLI module
And the module should have a cli attribute
And the module should have a main attribute
Scenario: Platform handles already imported module
When the CLI module is already imported
And I call ensure_cli_importable
Then it should return the cached module
Scenario: Platform handles import errors
When the CLI module import fails
And I call ensure_cli_importable
Then it should propagate the import error
# ============================================================
# Originally from: scripts.feature
# Feature: Scripts functionality
# ============================================================
Scenario: Do-something shell script executes
Given I have the do-something.sh script
When I execute the do-something.sh script
Then the script output should contain "This script does a thing"