I just run standalone version of WireMock to catch my requests and
corresponding responses from multimodule project in Java EE. Now I have these (thousands) files in folders __files
and mappings
.
I have many of tests with a lot of requests so I want to load relevant mapping and responses. How is this done?
I found only answers like this:
public void exampleTest() {
stubFor(get(urlEqualTo("/my/resource"))
.withHeader("Accept", equalTo("text/xml"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
.withBody("<response>Some content</response>")));
I just do not want to change every field manually. Thanks.