You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by H Developer <as...@gmail.com> on 2014/10/28 18:45:05 UTC

Running load test for N number of users and M number of transactions, using possibly two datasources

Hi,
I would like to run JMETER using two different data sources.

The first data source (userDs.csv) will be used to store the user related
information and will look like:

user1,password1
user2,password2
..
..
user10,password10.


Each user after connected to the system will execute a set of transactions
and transaction related information that will possibly be kept in
transaction data source such as:

transactionId1,transactionDetail1
transactionId2,transactionDetail2
..
..
..
transactionId100, transactionDetail100

So 10 users will execute 100 unique transactions.For instance, the
execution schema will be like:

user1 --> transactionId1, transactionId2, .. transactionId10
user2 --> transactionId11, transactionId12, .. transactionId20
..
..
user10 --> transactionId91, transactionId92, .. transactionId100

I tried to do this using thread properties, by setting user count 10 and
loop count 10. However it ended up trying to read 100 users and each one
tries to execute 1 transaction from the transaction data source. Is there a
way to achieve what I am trying to do?

Thanks in advance,
H.

Re: Running load test for N number of users and M number of transactions, using possibly two datasources

Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hello,
Note that besides RedisDataSet , there is a new component in JMeter Plugins
project:
http://jmeter-plugins.org/wiki/HttpSimpleTableServer/

Regards
Ubik Load Pack Team

On Thu, Oct 30, 2014 at 7:50 PM, Flavio Cysne <fl...@gmail.com> wrote:

> I'll just link you to a third party comparison, since I never used Visual
> Studio Load Test tool.
>
>
> http://sqa.stackexchange.com/questions/9572/comparison-of-jmeter-vs-visual-studio-load-test
>
> Since JMeter don't have any built-in test data distribution component is up
> to you to decide what is the best approach for spreading your test data.
> You could use Maven and JMeter Maven Plugin or JMeter Ant Task. The
> goals/tasks with the distribution strategy could be defined in the pom.xml.
> Since you can pass parameters to maven execution, the number of machines
> you'll have to distribute your test data can be configurable.
>
> Any way, as JMeter is an open-source project and allows plugins to be
> attached to it, you can also write your own test data distribution plugin.
>
> JMeter-Plugins <http://jmeter-plugins.org> has also a plugin, Redis Data
> Set
> <http://jmeter-plugins.org/wiki/RedisDataSet/>, that can help you with
> this.
>



-- 

Regards
Ubik Load Pack <http://ubikloadpack.com> Team
Follow us on Twitter <http://twitter.com/ubikloadpack>


Cordialement
L'équipe Ubik Load Pack <http://ubikloadpack.com>
Suivez-nous sur Twitter <http://twitter.com/ubikloadpack>

Re: Running load test for N number of users and M number of transactions, using possibly two datasources

Posted by Tim Koopmans <ti...@flood.io>.
I'd also recommend using a centralised store like redis -- this is the
direction we went to solve the problem of sharing test data amongst N nodes
in a grid (of jmeter machines) https://flood.io/blog/9-sharing-test-data

Then if you don't want the hassle of using a redis data set plugin, you can
optionally stick something like webdis in front of the redis box which
means your data is accessible via simple http calls (with a regex extractor
or the like) https://github.com/nicolasff/webdis

Regards,


Tim Koopmans
+61 3 9221 6309

[image: Flood IO Pty Ltd] <https://flood.io>

Level 27, 101 Collins Street
Melbourne, Vic 3000



On Fri, Oct 31, 2014 at 5:50 AM, Flavio Cysne <fl...@gmail.com> wrote:

> I'll just link you to a third party comparison, since I never used Visual
> Studio Load Test tool.
>
>
> http://sqa.stackexchange.com/questions/9572/comparison-of-jmeter-vs-visual-studio-load-test
>
> Since JMeter don't have any built-in test data distribution component is up
> to you to decide what is the best approach for spreading your test data.
> You could use Maven and JMeter Maven Plugin or JMeter Ant Task. The
> goals/tasks with the distribution strategy could be defined in the pom.xml.
> Since you can pass parameters to maven execution, the number of machines
> you'll have to distribute your test data can be configurable.
>
> Any way, as JMeter is an open-source project and allows plugins to be
> attached to it, you can also write your own test data distribution plugin.
>
> JMeter-Plugins <http://jmeter-plugins.org> has also a plugin, Redis Data
> Set
> <http://jmeter-plugins.org/wiki/RedisDataSet/>, that can help you with
> this.
>

Re: Running load test for N number of users and M number of transactions, using possibly two datasources

Posted by Flavio Cysne <fl...@gmail.com>.
I'll just link you to a third party comparison, since I never used Visual
Studio Load Test tool.

http://sqa.stackexchange.com/questions/9572/comparison-of-jmeter-vs-visual-studio-load-test

Since JMeter don't have any built-in test data distribution component is up
to you to decide what is the best approach for spreading your test data.
You could use Maven and JMeter Maven Plugin or JMeter Ant Task. The
goals/tasks with the distribution strategy could be defined in the pom.xml.
Since you can pass parameters to maven execution, the number of machines
you'll have to distribute your test data can be configurable.

Any way, as JMeter is an open-source project and allows plugins to be
attached to it, you can also write your own test data distribution plugin.

JMeter-Plugins <http://jmeter-plugins.org> has also a plugin, Redis Data Set
<http://jmeter-plugins.org/wiki/RedisDataSet/>, that can help you with this.

Re: Running load test for N number of users and M number of transactions, using possibly two datasources

Posted by H Developer <as...@gmail.com>.
Hi, thanks for the reply yes it helps. the only difference that I made
instead of

 __CSVRead(per-user-csv-file-${__threadNum()}.csv,0)

I used

 __CSVRead(per-user-csv-file-${__threadNum()}.csv,0).
__CSVRead(per-user-csv-file-${__threadNum()}.csv,next)

to be able to read the next row instead of reading the same record 100
times.

However I believe, this is not a good strategy compared to visual studio
distrubuted load test features. I was using VS before and the controller
(in jmeter master) in VS controls the user distribution using a single
pointer across the slaves.
Here on the other hand, you have to specify which slave will run exactly
which users and transactions before each test run. If you change the number
of slaves or the number of users, you have to update your userDs and
transactionDs files and copy them over to the slaves.

I am just new to Jmeter and will see what is its strength and weaknesses
over Visual Studio, if you have any good comparison article between them
that I can also appreciate that.

Thanks.


On Tue, Oct 28, 2014 at 3:12 PM, Flavio Cysne <fl...@gmail.com> wrote:

> Suggestions:
>
> * For single JMeter instance, distribute your transaction data in files
> numbered by user thread number (from 1 to 10, in your case)
>
> #1
> Test Plan (if users have to run sequentially)
>     - CSV Dataset Config (userDs.csv)
>     - Counter (start: 1, end: 10, increment: 1, referenceName: counter)
>     - Threads Group (threads: 1, loop: 10)
>         - Loop Controller (loop: 100)
>             - Samplers -> Use __CSVRead to a variable using ${counter} as
> part of it, like: __CSVRead(per-user-csv-file-${counter}.csv,0)
>
> #2
> Test Plan (if users will run simultaneously)
>     - CSV Dataset Config (userDs.csv)
>     - Threads Group (threads: 10, loop: 1)
>         - Loop Controller (loop: 100)
>             - Samplers -> Use __CSVRead to a variable using __threadNum as
> part of it, like: __CSVRead(per-user-csv-file-${__threadNum()}.csv,0)
>
>
> * For distributed environment with 10 JMeter slaves, each slave will have
> to have two CSV files (userDs.csv and per-user-csv-file.csv) with the data
> to use for the specific user
>
> each JMeter slave will have a userDs.csv file with only one line inside it,
> the one with the specific user data (ex: in JMeter slave 1, userDs.csv will
> have only one line: user1,password1)
>
> #3
> Test Plan (add Test Plan variables relative to user.properties keys. ex:
> user: ${__P(user,NOT_DEFINED)} / password : ${__P()}
>     - CSV DatasetConfig (userDs.csv)
>     - CSV DatasetConfig (per-user-csv-file.csv)
>     - Thread Group (threads: 1, loopCount 100)
>         - Samplers (no specific advice here. since every per-user data is
> distributed in distinct JMeter slaves, just use the field names as normal)
>
>
> Hope it helps
>

Re: Running load test for N number of users and M number of transactions, using possibly two datasources

Posted by Flavio Cysne <fl...@gmail.com>.
Suggestions:

* For single JMeter instance, distribute your transaction data in files
numbered by user thread number (from 1 to 10, in your case)

#1
Test Plan (if users have to run sequentially)
    - CSV Dataset Config (userDs.csv)
    - Counter (start: 1, end: 10, increment: 1, referenceName: counter)
    - Threads Group (threads: 1, loop: 10)
        - Loop Controller (loop: 100)
            - Samplers -> Use __CSVRead to a variable using ${counter} as
part of it, like: __CSVRead(per-user-csv-file-${counter}.csv,0)

#2
Test Plan (if users will run simultaneously)
    - CSV Dataset Config (userDs.csv)
    - Threads Group (threads: 10, loop: 1)
        - Loop Controller (loop: 100)
            - Samplers -> Use __CSVRead to a variable using __threadNum as
part of it, like: __CSVRead(per-user-csv-file-${__threadNum()}.csv,0)


* For distributed environment with 10 JMeter slaves, each slave will have
to have two CSV files (userDs.csv and per-user-csv-file.csv) with the data
to use for the specific user

each JMeter slave will have a userDs.csv file with only one line inside it,
the one with the specific user data (ex: in JMeter slave 1, userDs.csv will
have only one line: user1,password1)

#3
Test Plan (add Test Plan variables relative to user.properties keys. ex:
user: ${__P(user,NOT_DEFINED)} / password : ${__P()}
    - CSV DatasetConfig (userDs.csv)
    - CSV DatasetConfig (per-user-csv-file.csv)
    - Thread Group (threads: 1, loopCount 100)
        - Samplers (no specific advice here. since every per-user data is
distributed in distinct JMeter slaves, just use the field names as normal)


Hope it helps