3
votes

Is there any way to use this option "edit" of "share mode" in CSV Data Set Config? I have found the description in official web site?

apache jmeter component CSV Data Set Config

Identifier - all threads sharing the same identifier share the same file. So for example if you have 4 thread groups, you could use a common id for two or more of the groups to share the file between them. Or you could use the thread number to share the file between the same thread numbers in different thread groups.

But I don't understand what is the mean of common id and thread number? How can I use them for the particular thread?

1

1 Answers

6
votes

For example you have file.csv with the following content:

line1
line2
line3
line4

And 2 Thread Groups with 2 users and 1 Loop executing a Sampler with the following label:

Sampler ${__threadNum} - ${foo}

For different Sharing Mode settings you will get the different behavior i.e.:

  • For sharing mode All Threads:

    Sampler 1 - line1
    Sampler 1 - line2
    Sampler 2 - line3
    Sampler 2 - line4
    
  • For sharing mode Current Thread Group you will get:

    Sampler 1 - line1
    Sampler 1 - line1
    Sampler 2 - line2
    Sampler 2 - line2
    
  • For sharing mode Current Thread you will get:

    Sampler 1 - line1
    Sampler 1 - line1
    Sampler 2 - line1
    Sampler 2 - line1
    
  • For sharing mode ${__threadNum} you will get:

    Sampler 1 - line1
    Sampler 1 - line2
    Sampler 2 - line1
    Sampler 2 - line2
    

Example Test Plan:

JMeter CSV Data Set Config ThreadNum

References: