load testing - Use of Beanshell Preprocessor for Parameterization in JMeter -


I am trying to use the Beanshalle preprocessor for parameterization in jmeter script. My Jmter script structure is described below as the test plan-> thread group-> transaction controller-> request. I want to know what procedure I should follow to pass the values ​​for the request dynamically.

A description and an example would be more useful with screenshots. / P>

Try the following test structure:

  • Thread group (all default) 1 user, 1 second ramp-up, 1 loop)
    • HTTP requests (see below for parameters)

http request description

  • BenShell with the following processor As a child of HTTP request :

      int min = integer .Portset (BS.ARGR [0]); // First parameter int max = integer Parasitic (bsh.args [1]); // Other parameters Insure Random = Min + (Int.) (Math. Random) * ((Maximum - Minimum) + 1); // Calculate the random number within the parameter vars.put ("RANDOM_NUMBER", String.valueOf (random)); Save the result in // RANDOM_NUMBER variable  

    and in the 100 300 "parameter: section

BENSAL PRE PROCESSOR

Then in the BENSAL PRE processor we can convert the RANDOM_NUMBER variable Define the value that we indicate in the HTTP request sample, the pre processor is requested before request so that the variable becomes. If you add the listener, you will see that the requests are 100-300 In the category Random number generated

SERP

Bansal pre processor should be added as a child request that you are going to Paramitriz.

See the guide for more information on Binashell scripting and Kitchenette book.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -