Hi everyone, I hope this message finds you well! I...
# help
r
Hi everyone, I hope this message finds you well! I’ve been working on an open-source issue that involves using a mock API for unit testing. I’m interested in utilizing WireMock for this purpose. However, I’ve encountered a challenge since our project is currently based on Java 8, and the version of WireMock I was considering requires Java 11 or newer. Could anyone recommend an appropriate version of WireMock that is compatible with Java 8, or suggest an alternative approach for mocking APIs in our unit tests? Thank you for your assistance!
l
I think java 11 became the baseline in the early 3.x.x beta releases so you will probably need to go back to the last 2.x release for java 8 support - https://github.com/wiremock/wiremock/releases/tag/2.35.0 A different option is to use test containers and load wiremock that way. I think you could use the later versions of wiremock doing it this way
You could use test containers to run the latest docker image - https://wiremock.org/docs/standalone/docker/
☝️ 1
Or the official test containers module - https://wiremock.org/docs/solutions/testcontainers/
t
r
Thank you so much for all the replies!! I will discuss these ideas with project maintainers. Again Thank you so much and best regards!