mardi 11 août 2020

spring-cloud-contract-wiremock | Registering Stubs Automatically vs Programmatically

I would like to continue loanding all my subs

@AutoConfigureWireMock(port = 0, stubs = "classpath:/mappings/perform-buyback")

And in some test cases on this test class, I would like to change some mock responses to simulate different scenarios.

When I run only my local test method it works fine, when I run all my class it fails. So I come to this question. Is that possible to overwrite some stub that was registered according to the documentation automatically and replace it with stubFor(get(urlEqualTo( programmatic in each method? What should be the behaver?

Aucun commentaire:

Enregistrer un commentaire