当我运行Jmeter时,测试用例失败,因为它比较了不需要的ASCII字符
结果如下:
Data '£107.29K' is missing;
Data '£131.72K' is missing;
Data '£67.05K' is missing;
Data '£93.84K' is missing;
Data '£107.29K' is new;
Data '£131.72K' is new;
Data '£67.05K' is new;
Data '£93.84K' is new;
当我检查回复时,预期的回复中没有这样的字符。在比较响应时没有显示任何差异。
如何跳过这种比较?
答案 0 :(得分:0)
尝试将字符串转换为utf-8
byte[] utf8Bytes = original.getBytes("UTF8");
String roundTrip = new String(utf8Bytes, "UTF8");
您可以参考此https://docs.oracle.com/javase/tutorial/i18n/text/string.html