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

  1. Value returned from JMeter JSR223 Sampler using .md5() function.

enter image description here

  1. MD5 value for same payload generated on Standard website

enter image description here

I think I am not able to parse it properly? Can someone please tell me where the problem is and how to fix it.

Thanks a lot in advance!



Solution 1:[1]

If you use something simple like foo you will see that your "Standard website" and JSR223 PreProcessor are generating the same value.

The question is how does your "Standard website" handle line breaks and other non-printable characters like whitespaces or tabs

So my expectation is that you should be asking your API developers regarding the request format, my expectation is that JMeter's checksum is correct.

You can look here for Groovy's implementation

More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T