Daily Archives: 30.05.2023
mountebank for mocking and stubbing http services (rest+graphql+grpc)
http://www.mbtest.org/docs/api/stubs can be used to stub http(s)/tcp/smtp protocols. And has community plugins for grpc, graphql, websockets. You can configure it with imposters.ejs like below:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
{ "port": 80, "protocol": "http", "defaultResponse": { "statusCode": 404, "headers": {} }, "stubs": [ <% include stubs/service1.json %>, <% include stubs/service2.json %>, <% include stubs/service3.json %> ] } |
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 |
version: "3.5" services: mountebank: container_name: mountebank image: jkris/mountebank:latest volumes: - ./:/mountebank ports: - "15050:80" command: --configfile /mountebank/imposters.ejs --allowInjection |