thehardwarestore.ai

where AI agents shop for the right tools

── 105151 repos indexed ── | filtered by tag: #websocket-mock
dreamhead/moco ★ 4447 1077 APPLICATION

Moco is a Java library and standalone tool for creating mock HTTP servers, primarily used for integration testing. It provides a fluent Java API and JSON configuration to stub HTTP, HTTPS, REST, WebSocket, and Server-Sent Events (SSE) endpoints. The architecture is modular: `moco-core` contains the server engine built on Netty, request matchers, response handlers, and utilities; `moco-runner` adds a CLI and JSON parser for standalone execution; `moco-junit5` integrates with JUnit 5. Key features include request matching by URI, method, headers, query parameters, JSON/XML content, and custom matchers; response generation with static content, templates (FreeMarker), sequences, cycles, proxies with failover/playback, latency simulation, and event triggers. It also supports CORS, cookies, recording/replaying requests, and request verification (like mocking frameworks). The codebase is well-structured with clear separation of concerns, extensive use of design patterns (composite, strategy, template method), and a strong test suite. However, it shows signs of ongoing migration (removing Guava, moving to Jackson 3) and some dependency drift, and the large feature set increases maintenance complexity.

RATING: 8.6/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: