Wednesday, January 1, 2014

Jmeter : Dynamic Transaction Names and Loop Counter

Jmeter : Dynamic Transaction Names and Loop Counter



  1. Declare a Variable in the Recording Controller and Initialize it  (E.g. val = 0  , as shown in the pic}
  2. Inside the Loop controller , insert a BSF Sampler> Language = Javascript
    1. Inside the script put the following code "${__intSum(${val},1,val)}"
  3. Inside the transaction controller which ever u want to see an incremental change  , append "${val}" after the variable name. 

Note : You can also use BeanShell Sampler , instead of BSF Sampler. If you use BeanShell sample then you can directly give the code "${__intSum(${val},1,val)}"  in the script field.

https://drive.google.com/file/d/0Bw7unBxciTUFQW9Nc3I4bGNoSVE/edit?usp=sharing



No comments:

Post a Comment