Expected == Actual: error reporting problem?

255 views
Skip to first unread message

Andrey Rubtsov

unread,
May 30, 2017, 5:50:24 AM5/30/17
to wiremock-user
Hey, guys,

So from time to time have the same issue with the same WireMock test, which remains unchanged over the time. Sew below.
The problem is that what was expected is exactly the same that was received. We are using version 2.3.1. 
I remember the was a WireMock reporting bug: in other words, it might be an error reporting problem, not request matching one. But I cannot find it now. Has this been fixed? Should I just upgrade? Otherwise I simply cannot see what needs to be fixed in my code.

com.github.tomakehurst.wiremock.client.VerificationException: A request was unmatched by any stub mapping. Closest stub mapping was: expected:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> but was:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> com.github.tomakehurst.wiremock.client.VerificationException: A request was unmatched by any stub mapping. Closest stub mapping was: expected:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> but was:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> at com.github.tomakehurst.wiremock.client.VerificationException.forSingleUnmatchedRequest(VerificationException.java:43) at com.github.tomakehurst.wiremock.client.VerificationException.forUnmatchedRequests(VerificationException.java:48)

Tom Akehurst

unread,
May 30, 2017, 9:29:51 AM5/30/17
to wiremock-user
Can I suggest trying with 2.6.0, then if you're still seeing the same problem, posting your full stub mapping and HTTP request details?

Andrey Rubtsov

unread,
May 30, 2017, 10:29:35 AM5/30/17
to wiremock-user
Hi, Tom,

So I have updated to 2.6.0 and got the same:

com.github.tomakehurst.wiremock.client.VerificationException: A request was unmatched by any stub mapping. Closest stub mapping was: expected:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> but was:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> com.github.tomakehurst.wiremock.client.VerificationException: A request was unmatched by any stub mapping. Closest stub mapping was: expected:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> but was:< POST /ClientApi/public/paymentservice/internal/transaction/createTransaction.do?userId=9999&sessionId=888843783&pageAttributeId=85&transactionSourceTypeId=5> at com.github.tomakehurst.wiremock.client.VerificationException.forSingleUnmatchedRequest(VerificationException.java:43) at com.github.tomakehurst.wiremock.client.VerificationException.forUnmatchedRequests(VerificationException.java:48) at com.github.tomakehurst.wiremock.junit.WireMockRule.checkForUnmatchedRequests(WireMockRule.java:87) at com.github.tomakehurst.wiremock.junit.WireMockRule.access$000(WireMockRule.java:33) at com.github.tomakehurst.wiremock.junit.WireMockRule$1.evaluate(WireMockRule.java:73) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

Tom Akehurst

unread,
May 31, 2017, 7:35:57 AM5/31/17
to wiremock-user
Right, so can you post your stub and request details as suggested?
Reply all
Reply to author
Forward
0 new messages