Closed authorjapps closed 5 years ago
@arunvelusamyd has upgraded to latest version <wiremock.version>2.19.0</wiremock.version>
PR https://github.com/authorjapps/zerocode/pull/139/files was raised to fix this issue. 👍
The new wiremock prints a nice output as below, also suggests where things went wrong.
See the below test in the repo- wiremock_integration/mock_via_wiremock_then_test_the_end_point.json
2018-10-16 23:28:59,421 [main] INFO org.jsmart.zerocode.core.httpclient.utils.HeaderUtils - Overridden the header key:api_secret, with value:secret-01-01
2018-10-16 23:28:59,431 [qtp1231006815-19] ERROR WireMock -
Request was not matched
=======================
-----------------------------------------------------------------------------------------------------------------------
| Closest stub | Request |
-----------------------------------------------------------------------------------------------------------------------
|
GET | GET
/api/v1/amazon/customers/cust-007 | /api/v1/amazon/customers/cust-007
|
api_key: key-01-01 | <<<<< Header is not present
api_secret: secret-01-01 | api_secret: secret-01-01
|
|
-----------------------------------------------------------------------------------------------------------------------
PR has been merged now.
@arunvelusamyd , would you be able to put an example in this HelloWorld repo highlighting the new WireMock feature: e.g. if a header is missed while calling an end-point(which expects a header), WireMock will suggest this with a comparison table. (When you get chance please)
or
Updating this Wiki Page will also do 👍 - https://github.com/authorjapps/zerocode/wiki/Mocking-end-points-via-WireMock(Simple-and-flexible)
Review Comment at PR by @nirmalchandra .