artilleryio / artillery-core

artillery-core - deprecated
Mozilla Public License 2.0
29 stars 104 forks source link

Match json fails for numeric value #196

Open matt-blanchette opened 7 years ago

matt-blanchette commented 7 years ago

match: json: "$.numberId" value: "{{ numberId }}"

The JSONPath here returns a numeric value. The variable value is always returned as a string (using string replace). The match exact comparison fails comparing the JSONPath number and the expected string.

If match also allowed transform (like capture), the json number could be converted to a string to pass the match comparison.

Or renderVariables could have a special case to return the exact variable value (if replacing only one variable).