jmeter響應結果亂碼問題

當響應數據或響應頁面沒有設置編碼時,jmeter會按照jmeter.properties文件中,sampleresult.default.encoding設置的格式解析html

默認ISO-8859-1,解析中文確定出錯ide

1 # The encoding to be used if none is provided (default ISO-8859-1)  
2 #sampleresult.default.encoding=ISO-8859-1  

方案一:直接修改sampleresult.default.encoding=UTF-8。(記住去掉#,不要仍是註釋狀態哦)

方案二:動態修改

   step1:指定請求節點下,新建後置控制器"BeanShell PostProcessor"編碼

   step2:其腳本框中輸入:prev.setDataEncoding("UTF-8");spa

   step3:保存code

轉載於:https://www.cnblogs.com/tangmaokai/p/5830344.htmlhtm

相關文章
相關標籤/搜索