问题
path: $.ActiveScriptJobID, actual: '17124', expected: '#number', reason: not a number
Above error message displays for below scenario
Given path 'admin/rest/activescript/job/17124' When method get Then status 200 * match resp.ActiveScriptJobID == "#number"
回答1:
You haven't provided the actual response so your question is incomplete.
But check the JSON. It is sure to be a string (within quotes) not a number.
Maybe you need to use a regex: https://github.com/intuit/karate#fuzzy-matching
* match response.ActiveScriptJobID == "#regex \\d+"
来源:https://stackoverflow.com/questions/57760686/karate-api-assertion-with-fuzzy-matching-number