1

I'm executing JMeter loadtest on my system. We have 1 client server with JMeter GUI and 2 slaves servers.

e.g. client: 192.168.1.1 slave1: 192.168.1.2 slave2: 192.168.1.3

We are testing application where I need to login, do something and logout. Is it possible to test such application with 2+ slaves? Because I cannot login with the same user more times on server in current session. I get license error: "User is connected from another machine". I know, that jmeter multiplies Threads with number of slaves, but how to handle this situation?

Thanks

Samuel
  • 95
  • 1
  • 9
  • Do you want to test your scenario with multiple different users with different login credentials in distributed architecture? Try using [CSV Data Set Config](http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config). For Referrence: https://guide.blazemeter.com/hc/en-us/articles/206733689-Using-CSV-DATA-SET-CONFIG – Masud Jahan Oct 29 '16 at 11:06
  • Yes, I test it with 10 - 700 different users and different credentials. But what does it mean, when more slaves multiply Threads? e.g. 100 users = 100 threads on 1 slave, but 200 threads on 2 slaves...It means that, each slave tries to login the same users...or how to explain it? – Samuel Oct 29 '16 at 11:15
  • Your test plan will execute on each slave machine but can use different properties and parameters. You can use two different CSV files in different machines. – Masud Jahan Oct 29 '16 at 11:32
  • For distributed testing, the CSV file must be stored on the server host system in the correct relative directory to where the JMeter server is started. – Masud Jahan Oct 29 '16 at 11:33
  • great workaround to use 2 different csv files. Thanks – Samuel Oct 29 '16 at 11:35

2 Answers2

2

JMeter uses local CSV files in distributed mode. So you just place different files on each slave and it works.

For distributed testing, the CSV file must be stored on the server host system in the correct relative directory to where the JMeter server is started.

According to the Apache JMeter documentation,

By default, the file is only opened once, and each thread will use a different line from the file. However, the order in which lines are passed to threads depends on the order in which they execute, which may vary between iterations.

If you want each thread to have its own set of values, then you will need to create a set of files, one for each thread. For example test1.csv, test2.csv, …, testn.csv. Use the filename test${__threadNum}.csv and set the "Sharing mode" to "Current thread".

So just put your different credentials in different CSV.

Community
  • 1
  • 1
Masud Jahan
  • 3,418
  • 2
  • 22
  • 35
0

Either of below solutions will address your issue. I use Redis. It is super cool.

Redis:

http://www.testautomationguru.com/jmeter-make-data-sharing-easy-in-distributed-mode-using-redis/

HTTP Simple Table Server:

https://jmeter-plugins.org/wiki/HttpSimpleTableServer

vins
  • 15,030
  • 3
  • 36
  • 47