https://linen.dev logo
Title
s

Shruti Mishra

05/08/2023, 10:01 AM
Hi Team, I have written this code for wiremock integration testing with spring boot. Trying from few days, but getting this error. "Request was not matched because no stubs registered". 404 error. Can someone please suggest where the actual issue might be there. I have tried with the simplest stub also as possible, but still getting the same result.
o

Oleg Nenashev

05/08/2023, 11:43 AM
And what is your client code. There so many matchers set, and it us super unusual
My recommendation would be to actually debug the test and to see how the matchers work. U would expect that one of them does not match the request as you expect
s

Shruti Mishra

05/08/2023, 11:51 AM
Here I have not included the client code, since my requirement is to not have the assert statement in order to test the service. Since I want to have the service tested from postman itself, based upon the matchers that I have provided in the code.
I have also tried with the simplest matcher possible (i.e to have only one header parameter as a matcher and just the get call) but then also it did not seems to be working
o

Oleg Nenashev

05/08/2023, 11:56 AM
Hmm... In the code you have 4 header checks that need to be matched WireMock server to send the response
s

Shruti Mishra

05/08/2023, 11:59 AM
Yes I have tried a multiple times to have the header checks from postman...but still no success.