Hi all, I am looking to use wiremock for the first time as a simulator for a HTTP-based API that is not yet ready to be used so the UI will be calling wiremock to get responses. I have read through the documentation and looked through a few different examples and I have a few questions. I noticed that the documentation has a test scope - can wiremock be set up to simulate an API if it's only set up in the test files? or should this be set up in the main class and remove the test scope from the dependency? or is the only way to set it up as a simulator when used as a standalone server where I run the jar and add the mappings and responses?
Is there an example in github that I can look where it is used as an API simulator to be called from postman or the UI instead of just for testing?
Hi @Bas Dijkstra I did read through that documentation. So to use it in java, I need to remove the test scope in the maven file, correct? Otherwise, the dependency will not import to the main class. Is that the correct usage?
I did see a cool demo with WireMock and the state extension being used to mock the backend for a UI. I think that might have been using WireMock standalone (or in docker). I'll see if I can find the video.
Lee Turner
12/06/2024, 6:19 PM
Think it was this one. There is a demo about 12 mins into the video -