How to put a variable in a Jans Beanshell function

0

I have a problem with JMeter Beanshell and I want to put in a function that I call but the problem is that I can not detect it instead if I put a number if:

And the error:

Someone who can help me since I've been looking and there is not much information online.

    
asked by Moisés Ortega Rodríguez 20.08.2018 в 13:19
source

1 answer

0

In your Beanshell preprocessor use   vars.put("randomNumSum",Integer.toString(Integer.valueOf(num)+2)); instead of vars.put("randomNumSum",(Integer.valueOf(num)+2));

For more information about beanshell, you can go to the following link:

Complex logical testing with beanshell

    
answered by 21.08.2018 / 07:31
source