I would use the beanshell pre-processor. BS / BSF allows you to enter a code snippet, java being my choice. So you use vars.get(); and vars.put(); methods to get and update jmeter runtime variables. In the beanshell you use whatever code logic you need in order to extend the functionality of your test plan (which, with normal jmeter GUI elements is somewhat limited).
I only use it when there is no alternative using default elements from jmeter or when I need some functionality available in a larger library, a .jar that is placed in jmeter's lib folder. Look it up in jmeter's manual, maybe you find something that relates to you. The purpose is to have something that allows you to replicate ajax processing, which is client side. Keep it to a must-have basis though, most requests can be replicated without duplicating client side logic. --Adrian S On Wed, Aug 1, 2012 at 3:48 PM, madhu sekhar <[email protected]>wrote: > Could you please explain me how BSF pre processor works in deeply? > > How to give function(syntax) at parameter value. > > On Wed, Aug 1, 2012 at 6:10 PM, Adrian Speteanu <[email protected]> > wrote: > > > Well, you'll still need to make http request for each ajax call made in > > real application. > > So create 1 http sampler that makes a correct request and in query > > parameter, use a variable. > > Add a beanshell preprocessor in order to gradually increment the value of > > the variable (for "smith" it will be s on first run, sm on second run, > smi > > on third run and so on). Now how to approach this is up to you. I would > > define the search term in a User Defined Variable and in the > pre-processor > > I would brake the word in its characters and gradually create a new > string > > with as many characters as needed. This allows you to enter a different > > word without changing the http sampler or the pre-processor. > > > > Does this relate to what you have in mind? (frankly, i'm not sure I > > understood perfectly what is not working for you...) > > > > It should work with a value previously extracted (and dynamic) which is > > passed to the sampler's pre-processor. > > > > --Adrian S > > > > On Wed, Aug 1, 2012 at 3:22 PM, madhu sekhar <[email protected] > > >wrote: > > > > > We need to make dynamic *auto complete* step in a test. > > > > > > We have the the parameter as *term=smith* at sampler of the same step > of > > > test . > > > > > > We need make the term as dynamic. I tired using post processor (regular > > exp > > > extractor), But in HTML content we are not founded the parameter in > > related > > > URL. > > > > > > But we got the same in JavaScript of autocomplete method. > > > > > > Could anybody please suggest me, How to proceed further to make it as > > > dynamic. > > > > > > > > > -- > madhu kk >
