0
votes

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?

1
This needs more information. What's your question? What code have you tried to accomplish your question? What's the exact problem with what you've tried?Sam
This could be done in number of ways. But in order to get the best solution you need to provide more details. What are requirements for users load in each scenario? Do you want to set total no. of threads to be shared for both scenarios OR you will be specifying different no of users for different scenarios?TestingWithArif

1 Answers

1
votes

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.