Skip to content

test(multi_agents): comprehensive test suite for orchestrator, workflow agent, and data types (+73 tests) - #151

Open
manus-use wants to merge 1 commit into
mainfrom
feat/test-multi-agents-orchestrator
Open

test(multi_agents): comprehensive test suite for orchestrator, workflow agent, and data types (+73 tests)#151
manus-use wants to merge 1 commit into
mainfrom
feat/test-multi-agents-orchestrator

Conversation

@manus-use

Copy link
Copy Markdown
Owner

Summary

Comprehensive test suite for the manus_agent.multi_agents package — 73 fully-mocked tests covering all public types, the WorkflowAgent class, and the Orchestrator class.

What's tested

Component Tests Coverage
AgentType enum 10 Values, str subclass, lookup, iteration
ComplexityLevel enum 7 Values, str subclass, lookup, invalid
TaskPlan dataclass 14 Construction, defaults, immutability (frozen), equality, mutable-field unhashability
OrchestratorResult dataclass 8 Construction, defaults, mutability, equality
WorkflowAgent 10 Init (default/custom model), system_prompt content, Agent delegation, exception propagation
Orchestrator 14 Init (config, model_name), run success/failure paths, str conversion, multiple calls
Module exports 4 __all__ completeness, importability
Integration scenarios 3 End-to-end Orchestrator → WorkflowAgent → Agent mock chain
main() function 2 Banner output, handle_request invocation

Why this matters

The multi_agents package is the core orchestration layer used by the CLI's multi-agent mode (Orchestrator is imported directly in cli.py). It had zero dedicated test coverage — any refactor or enhancement risked silent regressions.

Test approach

  • 100% mocked — no real LLM/API calls
  • Tests the public contract (construction, defaults, delegation, error handling)
  • Verifies frozen dataclass semantics (immutability, equality)
  • Tests the Orchestrator's exception-catching resilience
  • Confirms module __all__ exports match actual definitions

Checked against existing PRs (no overlap)

No existing open or merged PR covers the multi_agents/__init__.py orchestrator types or the multi_agents/workflow_agent.py WorkflowAgent class.

Test results

73 passed in 1.35s (test_multi_agents.py)
1231 passed, 3 deselected, 3 warnings in 25.60s (full suite)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant