Filter wiremock stubs

36 Views Asked by At

Hi i have spring application that is using wiremock. Its start wiremock with each test by @AutoConfigureWireMock annotation from springframework.cloud.contract. I'm keeping all of my stubs in resources/mappings

What i want to achive to load only 1 json stub per test. So i have stub1 and stub2, stub1 will be visible only in test1 and stub2 will be visible only in test2

Is it possible? I was trying to do some WireMock.reset etc but when its reset i'm lossing all of the stubs. But i need to restore them for next tests.

0

There are 0 best solutions below