208 lines
9.6 KiB
Gherkin
208 lines
9.6 KiB
Gherkin
@skip @wip
|
|
Feature: Missing Lines Coverage for Application.py
|
|
As a test suite
|
|
I want to cover specific missing lines in application.py
|
|
So that we achieve 90%+ coverage
|
|
|
|
Background:
|
|
Given the missing lines test environment is setup
|
|
|
|
Scenario: Single-shot with no config loaded error on line 220
|
|
Given I have an uninitialized application instance
|
|
When I attempt single-shot without loaded configuration
|
|
Then missing lines CleverAgentsException should be raised with "Configuration not loaded"
|
|
|
|
Scenario: Single-shot with None message content handling lines 231-236
|
|
Given I have an application with mocked stream router for None handling
|
|
When single-shot processes a None message on line 231
|
|
Then missing lines empty result should be returned on line 232
|
|
|
|
Scenario: Single-shot with message without content attribute lines 234-236
|
|
Given I have an application with mocked stream router for no content
|
|
When single-shot processes a message without content attribute
|
|
Then missing lines empty result should be returned for no content
|
|
|
|
Scenario: Interactive session with no config loaded error on line 288
|
|
Given I have an uninitialized application instance
|
|
When I attempt interactive session without loaded configuration
|
|
Then missing lines CleverAgentsException should be raised with "Configuration not loaded"
|
|
|
|
Scenario: Interactive help command lines 320-321
|
|
Given I have a configured application for interactive session
|
|
When interactive help command is processed on line 320
|
|
Then missing lines help information should be printed
|
|
|
|
Scenario: Interactive stream command processing lines 322-324
|
|
Given I have a configured application with named streams
|
|
When interactive stream command is handled on line 323
|
|
Then missing lines stream message should be sent
|
|
|
|
Scenario: Interactive graph command processing lines 325-327
|
|
Given I have a configured application with graph routes
|
|
When interactive graph command is handled on line 326
|
|
Then missing lines graph should be executed
|
|
|
|
Scenario: Interactive empty input handling lines 328-329
|
|
Given I have a configured application for interactive session
|
|
When empty input is provided to interactive session
|
|
Then missing lines processing should continue normally
|
|
|
|
Scenario: Interactive keyboard interrupt handling lines 340-342
|
|
Given I have a configured application for interactive session
|
|
When keyboard interrupt occurs during interactive session
|
|
Then missing lines interrupt should be caught and handled
|
|
|
|
Scenario: Interactive EOF handling lines 343-344
|
|
Given I have a configured application for interactive session
|
|
When EOF is encountered during interactive session
|
|
Then missing lines session should break gracefully
|
|
|
|
Scenario: Config to dict conversion with no config line 358-359
|
|
Given I have an application with no configuration loaded
|
|
When configuration is converted to dictionary format
|
|
Then missing lines empty dictionary should be returned
|
|
|
|
Scenario: Template registration with no config early return line 376-377
|
|
Given I have an application with no configuration loaded
|
|
When template registration is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Template registration with non-dict templates lines 384-385
|
|
Given I have an application with string template configuration
|
|
When template registration processes non-dict templates
|
|
Then missing lines string templates should be skipped
|
|
|
|
Scenario: Enhanced registry with raw template processing lines 414-441
|
|
Given I have an application with enhanced registry and raw templates
|
|
When raw templates are processed by enhanced registry
|
|
Then missing lines raw templates should be registered with correct types
|
|
|
|
Scenario: Agent creation error with no factory line 455-456
|
|
Given I have an application with no agent factory
|
|
When agent creation is attempted
|
|
Then missing lines AgentCreationError should be raised
|
|
|
|
Scenario: Agent creation with enhanced registry template instances line 474-491
|
|
Given I have an application with enhanced registry for template instances
|
|
When template instance agents are created with enhanced registry
|
|
Then missing lines enhanced instantiation should be used
|
|
|
|
Scenario: Agent creation with regular registry fallback lines 490-491
|
|
Given I have an application with enhanced registry but missing template
|
|
When template instance creation falls back
|
|
Then missing lines fallback agent definition should be used
|
|
|
|
Scenario: Agent creation with regular registry instantiation lines 495-498
|
|
Given I have an application with regular registry having instantiate capability
|
|
When regular template instantiation is used
|
|
Then missing lines regular registry should instantiate agent
|
|
|
|
Scenario: Agent creation with no instantiate capability lines 501-502
|
|
Given I have an application with limited registry without instantiate
|
|
When template instantiation is attempted without capability
|
|
Then missing lines instance config should be used directly
|
|
|
|
Scenario: Route setup with no routes early return lines 518-519
|
|
Given I have an application with no routes configuration
|
|
When route setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Route setup bridge initialization lines 522-527
|
|
Given I have an application with routes but no bridge
|
|
When route setup initializes bridge
|
|
Then missing lines RouteBridge should be created
|
|
|
|
Scenario: Route template with no registry fallback lines 538-544
|
|
Given I have an application with route templates but no registry
|
|
When route template instantiation falls back
|
|
Then missing lines template config should be used directly
|
|
|
|
Scenario: Stream route template field updates lines 548-561
|
|
Given I have an application with stream route templates
|
|
When stream route configuration is updated from template
|
|
Then missing lines stream fields should be properly updated
|
|
|
|
Scenario: Graph route template field updates lines 562-567
|
|
Given I have an application with graph route templates
|
|
When graph route configuration is updated from template
|
|
Then missing lines graph fields should be properly updated
|
|
|
|
Scenario: State class resolution failure lines 582-591
|
|
Given I have an application with invalid state class in graph route
|
|
When state class resolution fails
|
|
Then missing lines warning should be logged
|
|
|
|
Scenario: Bridge route registration lines 607-609
|
|
Given I have an application with bridge routes
|
|
When bridge routes are processed
|
|
Then missing lines bridge route should be logged
|
|
|
|
Scenario: Stream operations with no config early return line 615-616
|
|
Given I have an application with no configuration
|
|
When stream operations setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Merge operations processing lines 619-624
|
|
Given I have an application with merge configurations
|
|
When merge operations are setup
|
|
Then missing lines streams should be merged correctly
|
|
|
|
Scenario: Split operations processing lines 627-632
|
|
Given I have an application with split configurations
|
|
When split operations are setup
|
|
Then missing lines streams should be split correctly
|
|
|
|
Scenario: Subscription re-setup after operations lines 644-648
|
|
Given I have an application with stream routes and operations
|
|
When subscriptions are re-setup after operations
|
|
Then missing lines subscriptions should be re-established
|
|
|
|
Scenario: Pipeline setup with no config early return line 654-655
|
|
Given I have an application with no pipeline configuration
|
|
When pipeline setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Pipeline configuration conversion lines 658-667
|
|
Given I have an application with pipeline configurations
|
|
When pipeline setup converts configurations
|
|
Then missing lines pipelines should be created through bridge
|
|
|
|
Scenario: Stream command with invalid stream lines 682-683
|
|
Given I have an application for interactive commands
|
|
When stream command uses non-existent stream
|
|
Then missing lines stream not found error should be shown
|
|
|
|
Scenario: Graph command with invalid graph lines 702-703
|
|
Given I have an application for interactive commands
|
|
When graph command uses non-existent graph
|
|
Then missing lines graph not found error should be shown
|
|
|
|
Scenario: Graph command usage error line 720
|
|
Given I have an application for interactive commands
|
|
When graph command has invalid usage
|
|
Then missing lines usage error should be shown
|
|
|
|
Scenario: Graph execution with no messages lines 736-739
|
|
Given I have an application with graph that returns no messages
|
|
When graph is executed
|
|
Then missing lines state should be displayed instead
|
|
|
|
Scenario: Graph execution error handling lines 741-742
|
|
Given I have an application with graph execution errors
|
|
When graph execution fails
|
|
Then missing lines error should be caught and displayed
|
|
|
|
Scenario: Application disposal lines 746-747
|
|
Given I have an application with stream router
|
|
When application is disposed
|
|
Then missing lines stream router should be disposed
|
|
|
|
Scenario: Network visualization with complex configuration lines 760-795
|
|
Given I have an application with complex network configuration
|
|
When network visualization is generated
|
|
Then missing lines visualization should include all components
|
|
|
|
Scenario: Network visualization with unsupported format lines 798
|
|
Given I have an application for visualization
|
|
When unsupported format is requested
|
|
Then missing lines unsupported format message should be returned |