Anandh R
Anandh R

Reputation: 109

How to randomize website test using jmeter?

I want to test multiple scenarios in a same website using JMeter.

For example I have 2 thread users.

I want..

>1st user performing 1st scenario: like login his account
>2nd user performing 2nd scenario: browse some other page

How this can be achieved in JMeter?

Upvotes: 0

Views: 98

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

If you need 50% of users to perform login and 50% of users to browse the website there are following options available:

  1. Use 2 separate Thread Groups:

    • Thread Group 1: with virtual users who perform login
    • Thread Group 2: with virtual users who perform browsing
  2. Use Throughput Controller like:

    • Add Throughput Controller configured like:

      • Percent Executions
      • 50.0
    • Add the relevant sampler(s) under the Throughput Controller (as child)
    • Do the same for 2nd, etc. scenarios

See Running JMeter Samplers with Defined Percentage Probability article for more detailed explanation of above and more complex distribution scenarios.

Upvotes: 1

Related Questions