Have JMeter select one login type

Viewed 24

I currently have a test plan set up, with the following fragment:

Thread Group
  - Simple Controller
    - Once Only Controller
      - Login type 1 (Simple Controller)
      - Login type 2 (Simple Controller)
  - Simple Controller
    - Sampler
    - Sampler

I would like each thread to choose one of the login types when they go through the Once Only Controller. So, for example, I'd like 70% to go through Login Type 1 (but not Login type 2), while the other 30% go through Login type 2 (but not Login type 1). How would I go about achieving this?

1 Answers

You can add Throughput Controllers as the parents for your login samplers and specify how often do you want them to be executed

Thread Group
  - Simple Controller
    - Once Only Controller
      - Throughput Controller, Based on: Percent Executions, Throughput: 70%
        - Login type 1 (Simple Controller)
      - Throughput Controller, Based on: Percent Executions, Throughput: 30%
        - Login type 2 (Simple Controller)
  - Simple Controller
    - Sampler
    - Sampler

More information: Running JMeter Samplers with Defined Percentage Probability

Related