title: How to generate random number using beanshell post processor in JMeter
body: <p>I am trying to generate a random number using beanshell post processor but I am continuously getting an error </p>
  
  <pre><code> "ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval   In file: inline evaluation of: `` try {....."
  </code></pre>
  
  <p>I am fetching the total count of matching records through Regular Expression extractor and passing the variable to the Post processor but it's not working.</p>
  
  <p>Please see the screenshot.<a href="https://i.stack.imgur.com/sifuj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sifuj.png" alt="Regular Expresssion Extractor"></a>
  <a href="https://i.stack.imgur.com/eGbcA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eGbcA.png" alt="Beanshell Script"></a></p>