jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: How to use different data sets in a loop or foreach controller for a single thread
Date Mon, 08 Jun 2009 20:25:32 GMT
You have to make the variable name dependent on the iteration count and use
__javaScript (or beanshell etc) to read the value .
The problem you will run into is how to save the variable data
e.g. you could use a User Parameters with a single user and mutliple
variables like firstName_1, firstName_2, lastName_1,lastName_2
or you could use BeanShell PreProcess and set data into the vars object,
reading from an array(indexed by the current count) in the beanshell script
itself

OR
you could just let go of your prejudice against having test data external to
the script and use a CSV data set config

regards
deeak

On Mon, Jun 8, 2009 at 11:40 AM, Bakul Mukherjee <bmukherjee@stratify.com>wrote:

> Hi,
>
> I have a use case where one user is performing the same set of actions
> multiple times one after the other and is providing different data sets for
> each set of actions.
>
> Thread Group
>     |
>     |
>      -->Loop or For Each Controller
>            |
>            |
>             --> Action 1
>            |
>            |
>             --> Action 2
>            .
>            .
>            .
>            --> Action N
>
> So I have to use a single thread with either a loop or for each controller
> and each iteration of the loop will use a different set of values for a set
> of variables.
> Is there any way to achieve this without using CSV Data set or CSV read. I
> would prefer to set variables in the test plan itself without creating
> external files to read from.
>
> I tried using User Parameters where I had defined multiple variable with
> multiple values per variable, with update once per iteration option checked,
> but that didn't work. For each iteration it always picked the first value of
> each variable, I believe it is because I have only one thread.
>
> If this is not a supported feature, it would be a nice feature to add
> support for. I believe lots of users would find this feature useful without
> having to create a bunch of additional files.
>
> Any help would be appreciated.
>
> Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message