JMeter : SwitchControler or How to run a sampler with a certain percentage

on 30 December GROOVY, JMETER, LOAD_TESTING, PERFORMANCE and Tags: , , , with 1 comment

Context: Example: SwitchControler or How to run a sampler with a certain percentage: Create a Test Plan like this one: // Array of values that contain the % repartition we want int[] values = (int[])vars.getObject(“RANDOM_VALUES”); if(values==null) {     values =  [0,1,2,3,2,3,1,3,2,3] as int[];     vars.putObject(“RANDOM_VALUES”,values); } // Increment that will be used in SwitchController value […]

Read more