🙋♂️ Hello, I have a question. I was reading the WireMock's documentation, specifically Running without http server section. Why one would need that? What is a possible use case?
I use WireMock for integration tests, and usually with them, we want to test components against something as similar as possible to the real environment (therefore a "real" HTTP server).
✅ 1
t
Tom
09/12/2024, 12:12 PM
There are HTTP clients and some frameworks that abstract their HTTP interfaces in a way that allows HTTP messages to be interchanged, but skipping the networking part. The thing you’ve referred to provides an entry-point for these types of case.
Tom
09/12/2024, 12:13 PM
I think @Jamie Tanna [he/him] contributed this capability originally so perhaps he can share which tool specifically he planned to use it with
j
Jamie Tanna [he/him]
09/12/2024, 12:21 PM
It was me, yes! The linked blog post (https://www.jvt.me/posts/2021/04/29/wiremock-serverless/) from the docs has a bit more info, but it was so we could run Wiremock in an AWS Lambda function, allowing us to avoid having long-running infra for a particularly uncertain - but not super important - traffic load for a customer facing staging environment
t
Tom
09/12/2024, 12:22 PM
Ah yeah, this is coming back to me now. Thanks @Jamie Tanna [he/him]!
💜 1
s
Simone Giusso
09/12/2024, 1:08 PM
Alright so it is mainly to reduce the amount of resources consumed and potentially improving test execution time when it's needed. I see the meaning of it in your use case.
Thank you, both.
t
Tom
09/12/2024, 1:10 PM
It can be. Or in Jamie’s case simply allowing it to be plugged into an external web server and delegated to e.g. by AWS Lambda.