Search code examples
csvjmeterloop-counter

Run user defined in csv; for the number of loop defined In Thread Group -Jmeter


Scenario: CSV File contains 5 Username and Password and below are the settings Recycle on EOF: false Stop thread on EOF: true Sharing Mode: Current Thread Group

Total there are 3 thread group below are the settings:
        Thread 1 : Numbers of Thread = 1, Loop Count l; for this thread group single user run for 1 time
        Thread 2 : Numbers of Thread = 2, Loop Count 5; for this thread group two user and each user run for 5 time
        Thread 3 : Numbers of Thread = 3, Loop Count 3; for this thread group three user and each user run for 3 time

Below are my test configuration:

Test Plan
    HTTP Header Manager
    HTTP Request Defaults
    CSV Data Set Config
    Test Fragment
        Login - HTTP Request
            JSON Extractor
    Thread Group - 1
        Module Controller - Login
        Transaction - HTTP Request
            HTTP Header Manager

    Thread Group - 2
        Module Controller - Login
        Finance - HTTP Request
            HTTP Header Manager

    Thread Group - 3
        Module Controller - Login
        Insurance - HTTP Request
            HTTP Header Manager

Here for Thread 2 and Thread 3; it runs for two 2 and 3 users; but not loop count doesn't work.


Solution

  • Loop will not work as you have configured "Recycle on EOF: false". Make it true and it will work. But, it will recycle.

    If you want specific user/s for one thread group then use 3 different csv's under each thread group and put 1 user in csv for 1st thread group and 2 users in second csv for 2nd thread group and 3 users in 3rd csv for 3rd thread group.