7 Protocols, 1 Binary, 0 Dependencies
Last year I counted the mock tools running on my laptop. WireMock for HTTP (Java, 200MB Docker image). A custom Node script for WebSocket. Mosquitto for MQTT. A Go stub for gRPC. Four tools, four r...

Source: DEV Community
Last year I counted the mock tools running on my laptop. WireMock for HTTP (Java, 200MB Docker image). A custom Node script for WebSocket. Mosquitto for MQTT. A Go stub for gRPC. Four tools, four runtimes, four sets of config files, four ports to remember. I spent more time wiring up mock infrastructure than writing the code it was supposed to help me test. So I built mockd. One binary: mockd add http --path /api/orders --status 200 \ --body '{"orders": [{"id": "{{uuid}}", "total": {{faker.price}}}]}' Created mock: http_c9e4c315168bcfbe / Type: http / Method: GET / Path: /api/orders / Status: 200 curl http://localhost:4280/api/orders {"orders": [{"id": "7e53e8ca-...", "total": 405.87}]} HTTP done. Same binary, six more protocols to go. All 7 protocols Every protocol follows the same pattern: mockd add <type>, configure, hit the endpoint. No plugins. No extensions. No separate downloads. GraphQL mockd add graphql --path /graphql --operation GetUser \ --response '{"id":"1","name":"