Description
Attached the below zip release with modified cats-mock.feature file which shows the issue.
Kindly use karate standalone jar 1.2.0.
Command used to run the mocks:
Run the below command from the place where karate jar is placed(jar location - karate-1.2.0\karate-1.2.0).
karate -p 8080 -m src/demo/mock/cats-mock.feature
Issue:
pathMatches in mock is ignoring the first character of the path added inside it. Please refer the below example.
Scenario: pathMatches('/cats') && methodIs('get')
* def response = { "mock" : "cats" }
If I hit http://localhost:8080/cats from postman, Karate is returning 404. Please refer the below screenshots.
If I hit http://localhost:8080/acats from postman, Karate is returning 200 and picking up the above mentioned mock. Please refer the below screenshots.
So it is picking up the incorrect mocks and since it is ignoring the first character path is not matched properly while using pathMatches.
Note: This functionality is working fine in 1.1.0