Esty
Esty

Reputation: 1912

Jmeter user session wise different data set

My test plan is as following

- Test Plan
    - Thread Group (No of Threads: 4)
        - HTTP Request Defaults
        - HTTP Cookie Manager
        - CSV Data Set Config(Login Information) [4 user login]
        - Simple Controller
            - HTTP Request(GET: Open Login Page)
            - HTTP Request(POST: Login auth)
            - Loop Controller
                - CSV Data Set Config(Operation Information) [8 operation data]
                - HTTP Request(GET: Open Operation page)
                - HTTP Request(POST: Commit Operation)
            - HTTP Request(POST: Logout)

In this plan suppose I provide 4 users and 8 operation data. What it doing is running 8 operation for 4 users each in total of 8x4=32 operations.

How could I make this as following

1st user will do 2 operations
2nd user will do 2 operations
3rd user will do 2 operations
4th user will do 2 operations

I want to provide user session wise different operations that 4 users will do number of transactions but the transactions will not be same. How can I achieve this?

Upvotes: 0

Views: 275

Answers (2)

NaveenKumar Namachivayam
NaveenKumar Namachivayam

Reputation: 1202

As requested, I am posting my solution. Below is the test plan story.

Test Plan

My Test Plan

Thread Group

I used only 1 thread in my thread group and 4 in the loop count as shown below.

Thread Group

Loop Controller

Loop Controller

CSV Config for the both the files

CSV Config

Output

Output

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168082

If I'm getting your test scenario correctly you can just set the "Sharing Mode" of your CSV Data Set Config (Operation Information) to Current Thread Group.

Current thread group - each file is opened once for each thread group in which the element appears


If you want more precise control I believe Switch Controller is what you're looking for, using it you can select which user will go for which execution branch.

See Running JMeter Samplers with Defined Percentage Probability article for more information.

Upvotes: 1

Related Questions