0

I have a thread group with 2 different HTTP requests to test 10 users with CSV file of 10 rows of data.

In this scenario first HTTP request execute with 3 users with first 3 values from CSV file and remaining 7 users should used by second HTTP request with same CSV file used by remaining 7 data values.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Srinivaso
  • 51
  • 2
  • 9

1 Answers1

0

You can use Switch_Controller with 2 HTTP Samplers under it and use Switch Value with changing values: 0,0,0,1,1,1,1,1,1,1 - it'll execute 3 times first HTTP Sampler and 7 times second HTTP Sampler.

Such switch value can be obtain using JSR223 Sampler or JSR223 Pre Processor (with groovy language) before Switch_Controller with the code:

vars.put("switchValue", "0001111111".substring( vars.getIteration()-1, vars.getIteration()) );

and then use in Switch Controller Value: ${switchValue}

Ori Marko
  • 56,308
  • 23
  • 131
  • 233