我无法使用 Groovy JMeter 函数,MD5 函数返回的值与标准值不匹配

I am not able to work with Groovy JMeter function the value returned by MD5 function is not matching the standard values

  1. 使用 .md5() 函数从 JMeter JSR223 采样器返回的值。

  1. 在标准网站上生成的相同负载的 MD5 值

我想我无法正确解析它?谁能告诉我问题出在哪里以及如何解决。

非常感谢!

如果您使用像 foo 这样简单的东西,您会看到您的“标准网站”和 JSR223 预处理器生成相同的值。

问题是您的“标准网站”如何处理行 breaks and other non-printable characters like whitespaces or tabs

所以我的期望是您应该询问 API 开发人员有关请求格式的问题,我的期望是 JMeter 的校验和是正确的。

您可以查看 here 以了解 Groovy 的实现

有关 JMeter 中 Groovy 脚本的更多信息:Apache Groovy - Why and How You Should Use It