avi cohen
01/05/2023, 9:48 AMWilliam Laing
01/25/2023, 5:18 PMSundar
01/30/2023, 10:59 AMSundar
01/30/2023, 11:00 AMSundar
01/30/2023, 11:01 AMSundar
01/30/2023, 11:05 AMRoman Brühlmann
02/08/2023, 5:16 PMequalToJson
. In fact I've a date as property, which is created with LocalDateTime.now(). And clearly this date will never match. So here is my jsonRequestBody
String jsonRequestBody = String.format("{ \"document\": {\"documentData\": \"%s\"}, \"documentMetadata\": {\"documentId\": \"MYA-1234\", \"docType\": \"LEA\", \"docDataType\": \"PDF\", \"docName\": \"Some pdf\", \"insuredId\": 2000001, \"partnerId\": null, \"familyId\": 1000001, \"offerId\": null, \"contractId\": null, \"receiptId\": null, \"statementOfBenfitsId\": null, \"dasId\": null, \"zsrId\": null, \"enforcementId\": null, \"vipCode\": null, \"dossierId\": null, \"debitorId\": null, \"taskId\": null, \"tessiImageId\": null, \"invoiceId\": null, \"creationDate\": \"%s\", \"changeDate\": null, \"startDateRetentionPeriod\": null, \"insuranceType\": null, \"overdueReminderType\": null, \"receiptType\" : null, \"tessiType\" : null}}", document.getContent(), "${json-unit.ignore}");
As u can see, for the creationDate I'm trying to use a placeholder, like it's described here: https://wiremock.org/docs/request-matching/ But it doesn't work. Any idea why? Thank you in advanceShruti 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 adviceShruti Sagar Mishra
02/15/2023, 5:54 PMShruti Sagar Mishra
02/15/2023, 5:54 PMSanjay Adhikari
02/27/2023, 9:17 PMJedrzejNowacki
02/28/2023, 2:41 PM"mappings": [
{
"request": {
"urlPath": "/my-url",
"method": "POST",
"customMatcher" : {
"name" : "encrypted-request-matcher",
"parameters" : {
"myParameter" : "someValueThatWillMatch"
}
},
This is 2nd one, that tries to match, but should not be even considered for matching.
"mappings": [
{
"request": {
"url": "/another-url",
"method": "POST",
"bodyPatterns": [
{
"equalToJson": {
"data": {
"type": "identifier",
"attributes": {
"id": "1"
}
}
I put some debugs in custom matcher and it is clearly visible, that when wiremock attempts to match 2nd request (why would it even go through custom matcher?) it still holds the params from the 1st one! So "myParameter" : "someValueThatWillMatch" is still there.
I use standalone wiremock instance.JedrzejNowacki
03/02/2023, 1:36 PMLouis Liao
03/06/2023, 3:33 AMUri
03/06/2023, 6:41 PMTheUsharik
03/07/2023, 4:18 PMrepeatsAsScenarios
option if running WireMock as standalone app in docker container. Looks like this option is set to false
by default because in the logs I see messages like
Not recording mapping for /some/url as this has already been received
In my case it's crucial to record and replay all such queries as a scenario. What can I do here?Shlomy Sheps
03/12/2023, 3:28 PMLouis Liao
03/23/2023, 10:48 AMLouis Liao
03/23/2023, 10:48 AMRob Elliot
03/23/2023, 11:25 AMMarino Wijay
03/27/2023, 12:49 PM