Could you not simplify this with a Random Variable and series of IF 
Controllers? It's not perfect because of the multiple IFs but there's no code 
and it's more readable.

http://jmeter.apache.org/usermanual/component_reference.html#Random_Variable

The example below will run Sampler1 30% of the time and Sampler2 the other 70% 
of the time.

Thread Group
    - Random Variable 0 - 10
    - If Controller set to: ${myVar} <= 3
        HTTP Sampler1
    - If Controller set to: ${myVar} > 3
        HTTP Sampler2


On 2 Aug 2012, at 12:28, Philippe Mouawad wrote:

> Hello,
> Answer with Throughput Controller from ZK is also fine, the difference is
> that with my link you have a guarantee that one of the sampler will be
> executed if it's a requirement of your test.
> If it's not, Throughput Controller will do the job.
> 
> Regards
> Philippe
> 
> On Thu, Aug 2, 2012 at 1:23 PM, Philippe Mouawad <
> [email protected]> wrote:
> 
>> Hello,
>> I think this answers your question:
>> 
>>   -
>>   
>> http://www.ubik-ingenierie.com/ubikwiki/index.php?title=JMeter_Switch_Controller_or_How_to_Run_a_sampler_with_a_certain_Percentage
>> 
>> Regards
>> Philippe M.
>> http://www.ubik-ingenierie.com/-Solutions-
>> 
>> 
>> On Thu, Aug 2, 2012 at 1:13 PM, Ильдар <[email protected]> wrote:
>> 
>>> Hello there,
>>> 
>>> I have found "Weighted Distribution of tests" http://grinder.sourceforge.
>>> **net/g3/tutorial-weight-**distribution.html<http://grinder.sourceforge.net/g3/tutorial-weight-distribution.html>in
>>>  Grinder. Also googled but cannot find such feature in Jmeter. Is there
>>> any such feature in Jmeter?
>>> 
>>> Thanks!
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: 
>>> user-unsubscribe@jmeter.**apache.org<[email protected]>
>>> For additional commands, e-mail: [email protected]
>>> 
>>> 
>> 
>> 
>> --
>> Cordialement.
>> Philippe Mouawad.
>> Ubik-Ingénierie
>> 
>> 
>> 
>> 
> 
> 
> -- 
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie

Reply via email to