<@U090ER7JPHA> what is the test coverage of the fi...
# slackbot-chatter
q
@nutritious-balloon-65098 what is the test coverage of the files in this PR? https://github.com/All-Hands-AI/OpenHands-Server/pull/25
n
I'm on it! Ray Myers can track my progress here.
Test Coverage Analysis Summary for PR #25 I analyzed the test coverage of files modified in PR #25 (webhook subscriber implementation) in the OpenHands-Server repository. Here are the key findings: Overall Coverage: 0% The PR introduces approximately 176 lines of new code across 6 files with zero test coverage for the new functionality. Files Analyzed: 1. conversation_service.py - Added
_WebhookSubscriber
and
_EventSubscriber
classes (~95 lines) - 0% coverage 2. config.py - Added
WebhookSpec
class (~28 lines) - ~10% coverage (only basic Config class partially tested) 3. pub_sub.py - Refactored to use
Subscriber
interface (~35 lines) - 0% coverage 4. event_service.py - Updated for subscriber interface (~12 lines) - 0% coverage 5. event_router.py - Minor WebSocket subscriber updates (~5 lines) - 0% coverage 6. *main.py* - Added reload excludes (~1 line) - 0% coverage Critical Gaps: • No tests for webhook HTTP posting, retry logic, or error handling • No tests for event buffering and queue management • No tests for session API key integration • No tests for the new pub/sub subscriber system • No tests for webhook configuration validation • Existing tests broken due to session_api_key API changes Test Execution Results: • ✅ 9 tests pass (build, env isolation, circular imports) • ❌ 2 test files fail with import errors • ❌ 8 config tests fail due to API changes • The passing tests don't exercise any main server code Recommendations: 7. Fix broken existing tests caused by session_api_key changes 8. Add comprehensive webhook tests for HTTP posting, retries, buffering 9. Add pub/sub system tests for subscriber management 10. Add integration tests for end-to-end webhook functionality 11. Consider test-driven development for future features The webhook functionality handles critical operations like HTTP requests, retries, and error handling that require thorough testing to ensure production reliability. I've created a detailed coverage report at
/workspace/project/OpenHands-Server/coverage_report.md
with specific recommendations and test structure suggestions. <sub>View full conversation</sub>