mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
- Add tests/integration/ directory with fixtures/ - Create echo_mcp_server.py for MCP testing - Create test_mcp_integration.py with basic tests - Fix bug in MCP client: use stdio_transport instead of _streams_context - Add examples/abp_demo.py demonstrating ABP protocol - Update openspec with integration tests change
933 B
933 B
Add Internal Integration Tests
Problem
The _internal architecture claims to support MCP (Model Context Protocol) and ACP (AstrBot Communication Protocol) clients, but these have never been tested with real connections. The ABP demo works, but MCP and ACP remain unverified.
Solution
Create comprehensive integration tests that:
- Start a real MCP server (using a simple echo server)
- Connect the MCP client to it
- Verify tool listing and calling works
- Do the same for ACP client
Why This Matters
- Architecture claims must be validated through tests
- MCP/ACP functionality is blocked by untested assumptions
- Integration tests catch regressions that unit tests miss
- Demonstrates the architecture works in practice
Scope
- Create
tests/integration/test_mcp_integration.py - Create
tests/integration/test_acp_integration.py - Use real subprocess servers for testing
- Ensure tests can run in CI