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 AMAnkit Singhal
03/30/2023, 2:45 PMkareem elkasaby
03/31/2023, 1:27 AMJai Nigam
04/10/2023, 11:40 AMEjiroghene Ineneji
04/12/2023, 5:26 PMIlia Pavlov
04/13/2023, 7:59 PM"bodyPatterns" : [ {
"matchesJsonPath" : "$.things[?(@.name == 'RequiredThing')]"
} ]
but got issue like like no expected characters or so.
body request is simple
{
"parameter1": 18,
"parameter2": true,
"parameter3": ["LOGO", "MARK"],
"parameter4": "AAPL",
"parameter5": "108X108"
}Oleg Nenashev
04/14/2023, 8:56 AMOleg Nenashev
04/14/2023, 8:56 AMOleg Nenashev
04/14/2023, 12:08 PMDanny Paniagua
04/14/2023, 3:23 PM"response": {
"status": "{{#eq (jsonPath request.body '$.token') 'happy-path-token'}}200{{else}}500{{/eq}}",
"headers": {
"Content-Type": "application/json"
},
}
and wiremock is throwing an error
Cannot deserialize value of type `int` from String "{{#eq (jsonPath request.body '$.paymentToken') 'happy-path-payment-token'}}200{{else}}500{{/eq}}": not a valid `int` value
I know I can just make separate mapping stubs for a 200 and 500 response, but just sort of playing around with the tech atm 🙂hog buba
04/14/2023, 5:16 PMCallum Johnson
04/17/2023, 2:47 PMViraj Sawant
04/19/2023, 6:59 AM