Shruti Sagar Mishra
02/15/2023, 5:24 PMHashMap<ExecutionDataKeys, Object> executionStates = new HashMap<>();
WireMockServer wireMockServer = new WireMockServer(
new WireMockConfiguration().port(8080)
.notifier(new Slf4jNotifier(true))
);
wireMockServer.start();
ArrayList<String> hostNames = new ArrayList<>(
Arrays.asList(
"<https://host1.com>",
"<https://host2.com>",
));
hostNames.forEach(host->{
wireMockServer.stubFor(any(urlMatching(host+".*"))
.atPriority(10)
.willReturn(aResponse().proxiedFrom(host)));
});
I have also set proxy in emulator to localhost:8080. But it seems whitlisting is not working. all of my request are getting blocked.
P.S. I am trying to use appium along with wiremock to test state changes in application
[10:53 PM] I have already waster 3-4 days on this, and feeling kind exausted in this.
[10:53 PM] Please adviceDaniel Ma
02/15/2023, 6:05 PMprivate static int port = 6677; @BeforeEach
public void setup() {
wireMockServer =
new WireMockServer(WireMockConfiguration.wireMockConfig().port(port));
wireMockServer.start();
<http://log.info|log.info>("WireMockServer started at : {}", wireMockServer.baseUrl());
}
Shruti Sagar Mishra
02/15/2023, 6:15 PMDaniel Ma
02/15/2023, 6:16 PM6677
which works for me. but I think you can use other port number as wellShruti Sagar Mishra
02/15/2023, 6:18 PMRob Elliot
02/15/2023, 6:49 PM