mehrdad2000 opened a new issue, #6269:
URL: https://github.com/apache/jmeter/issues/6269

   ### Expected behavior
   
   _No response_
   
   ### Actual behavior
   
   _No response_
   
   ### Steps to reproduce the problem
   
   Hi
   I'm using jmeter 5.6.2 with iso8583 plugin.
   
   try to use this groovy script but seems jmeter create two value for field 11 
that use random function ${__Random(111111111111,999999999999,)}!
   
   seems random function generate multiple value when access more than once!
   
   if (!vars.getObject('addMac')) {
       def macKey = new javax.crypto.spec.SecretKeySpec(
           org.jpos.iso.ISOUtil.hex2byte('1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A'), 
'ISO9797ALG3')
       def ssm = new nz.co.breakpoint.jmeter.iso8583.SecurityModule()
   
       vars.putObject('addMac', { sampler ->
           def msg = sampler.getRequest()
           def p = msg.getPackager()
   
           def bytes = [0,2,11,12,47].collect {
               p.getFieldPackager(it).pack(msg.getComponent(it))
           }.flatten() as byte[]
   
           sampler.addField('64', ssm.generateMAC(bytes, macKey, 
macKey.getAlgorithm()))
       })
   }
   vars.getObject('addMac').call(sampler)
   
   
   
   
![image](https://github.com/tilln/jmeter-iso8583/assets/26499665/84931e61-5028-44c0-bdad-c39877183d4a)
   
   
   FYI: main issue report [here 
](https://github.com/tilln/jmeter-iso8583/issues/87) and developer of this 
plugin told me this issue related to jmeter 5.6.2!
   
   
   Would you please fix this issue?
   Any idea?
   Thanks
   
   ### JMeter Version
   
   5.6.2
   
   ### Java Version
   
   _No response_
   
   ### OS Version
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to