Chinese characters as JSON value is not displayed correctly

487 views
Skip to first unread message

guan...@gmail.com

unread,
Nov 4, 2016, 10:02:17 AM11/4/16
to jmeter-plugins
In a JSON response containing Chinese chars such as:
{
:   "status":0,
:   "data":
:   {
:   :   "uid":null,
:   :   "id":497,
:   :   "vinCode":"VIN12345678901235",
:   :   "carBrandId":25,
:   :   "carBrandName":"大众",
.....


I use $.data.carBrandName to get JSON value and compare with the expected value ${carBrandName} which is defined in csv input file.

However, I get assertion failure in runtime which indicating that the JSON value is not correct, as below:

Could you let me know if there is any work around to fix this issue? I have set the properties in jmeter.properties:
sampleresult.default.encoding=UTF-8
jsyntaxtextarea.font.family=Hack



Andrey Pokhilko

unread,
Dec 7, 2016, 1:14:52 AM12/7/16
to jmeter-...@googlegroups.com

Hi,

I cannot reproduce what you say. Having set sampleresult.default.encoding=UTF-8 , I get 大众 as result.

I have attached my example test plan.

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

chinese.jmx
Reply all
Reply to author
Forward
0 new messages