问题描述:接口测试中异常用例GET请求路径中包含特殊字符或中文,运行jmeter会报错,取样器中只能看到Response400,响应结果为空

解决思路:

对于通过BODY发送的中文内容可以用Jmeter自带函数实现转码,${token}为特殊字符或中文

${__javaScript(encodeURIComponent('${token}'))}

${__urlencode('${token}'))}

接口案例如下:

/msp/getencode?vide=${__javaScript(encodeURIComponent('中文'))}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2022-01-21
  • 2021-09-28
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案