Hi Team, We have an automation repository which i...
# help
v
Hi Team, We have an automation repository which is seperate from the dev repository. We need mocked tests to run alongwith the regular tests. For example adding a test: 1) login -> 2) In dashboard - click on an item 3) Lands to another page 4) Click on another item to show the mock response instead of real api response Step 1,2 & 3 to run on regular service and 4 on Mock service. Note that the dev repository is seperate and I cannot change the base url or run it on a localhost. Is there a way we can intercept the real api calls and respond with mock when required?
t
WireMock can proxy conditionally so you can mix stub responses and calls to another service. If you set your app up to call WireMock then configure a low-priority proxy stub to point to your test environment this will do the trick.
1