On 10/09/2009, Deepak Shetty <[email protected]> wrote:
> hi
>
> >Duplicate the user on each line (as already suggested by the OP).
>
> The way the test is structured
>  User1, Data1
>  User1, Data2
>  User2, Data3
>  User2, Data4
>  Thread1 = user1 , thread2 = user2

This was not specified as a requirement; the same thread may perhaps
do multiple users in sequence.

>  You can't directly use the CSV config right(without writing some logic or
>  loops)?

But I agree if the users are tied to threads, then that won't work.

Using __threadNum (as you suggested) will work fine if there are as
many threads as search sets, however the OP did say that he wants to
run many more threads.

In which case, assuming that there are 10 users, then "__threadNum MOD
10" will generate 10 different values that can be used to select a
different file.

This can be done using the following expression:

${__jexl(${__threadNum} % 10)}

This needs to be used as part of the filename on the CSV Dataset element

>  regards
>
> deepak
>
>
>  On Thu, Sep 10, 2009 at 10:06 AM, sebb <[email protected]> wrote:
>
>  > On 10/09/2009, Deepak Shetty <[email protected]> wrote:
>  > > hi
>  > >  just to confirm , the behavior being seen is because the file name is
>  > >  evaluated at configuration time but the variables aent set till the
>  > first
>  > >  iteration right?
>  >
>  > Yes.
>  >
>  > >  your suggestion works if there is one row per user. what would you
>  > suggest
>  > >  if there are multiple rows per user?
>  > >  regards
>  >
>  > Duplicate the user on each line (as already suggested by the OP).
>  >
>  > > deepak
>  > >
>  > >
>  > >
>  > >  On Wed, Sep 9, 2009 at 5:48 PM, sebb <[email protected]> wrote:
>  > >
>  > >  > Why not combine the user name with the search data?
>  > >  >
>  > >  > i.e. have a single CSV file with the username plus search data on the
>  > same
>  > >  > line.
>  > >  >
>  > >  > On 09/09/2009, Deepak Shetty <[email protected]> wrote:
>  > >  > > you need as many files as you have concurrent threads or you need
>  > someway
>  > >  > to
>  > >  > >  form the filename that doesnt need runtime data.
>  > >  > >
>  > >  > >
>  > >  > >  On Wed, Sep 9, 2009 at 12:43 PM, Steve Eckhart
>  > >  > >
>  > >  > > <[email protected]>wrote:
>  > >  > >
>  > >  > >  > I don't think the numeric increment will work, since each of the
>  > users
>  > >  > will
>  > >  > >  > get re-used by more than one thread (I need to get to hundreds of
>  > >  > threads,
>  > >  > >  > but don't want to create hundreds of users).
>  > >  > >  >
>  > >  > >  > -----Original Message-----
>  > >  > >  > From: Deepak Shetty [mailto:[email protected]]
>  > >  > >  > Sent: Wednesday, September 09, 2009 2:23 PM
>  > >  > >  > To: JMeter Users List
>  > >  > >  > Subject: Re: Selecting a CSV Data File Based on a Variable
>  > >  > >  >
>  > >  > >  > Ok the sharing mode is for a different problem you will face, it
>  > wont
>  > >  > >  > resolve the problem that your CSV file isnt being read...
>  > >  > >  > I guess you'd need to check the scoping rules for CSV data set
>  > config
>  > >  > >  > element and when it resolves the file name (seems to get done
>  > before
>  > >  > user
>  > >  > >  > parameters)
>  > >  > >  >
>  > >  > >  > Is there any possibililty that the file names can be a simple
>  > numeric
>  > >  > >  > increment (file1.csv, file2.csv etc) because then you could use
>  > >  > >  > ${__threadNum}
>  > >  > >  > which I know works
>  > >  > >  >
>  > >  > >  > regards
>  > >  > >  > deepak
>  > >  > >  >
>  > >  > >  > On Wed, Sep 9, 2009 at 12:05 PM, Steve Eckhart
>  > >  > >  > <[email protected]>wrote:
>  > >  > >  >
>  > >  > >  > > I tried changing the Sharing Mode to Current thread and got the
>  > same
>  > >  > >  > > results.
>  > >  > >  > >
>  > >  > >  > > Here's an outline of the test plan:
>  > >  > >  > >
>  > >  > >  > > Test Plan
>  > >  > >  > > - Thread Group
>  > >  > >  > >  -- CSV Data Set Config
>  > >  > >  > >     --- Variable Names:
>  > >  > CustomerCode,LogonName,Password,LockboxSearchFile
>  > >  > >  > >  -- Simple Controller: Lockbox Search
>  > >  > >  > >     --- User Parameters
>  > >  > >  > >         ---- DataFile: ${resourcePath}${LockboxSearchFile}
>  > (resolves
>  > >  > to
>  > >  > >  > the
>  > >  > >  > > full UNC path to the CSV file
>  > >  > >  > >     --- HTTP Request
>  > >  > >  > >         ---- CSV Data Set Config
>  > >  > >  > >              ----- Filename: ${DataFile}
>  > >  > >  > >              ----- Variable Names:
>  > siteLockboxID,DateFrom,DateTo
>  > >  > >  > >              ----- Sharing Mode: Current thread
>  > >  > >  > >         ---- Debug Sampler
>  > >  > >  > >
>  > >  > >  > > I also tried moving the CSV Data Set to just before the HTTP
>  > >  > Request.
>  > >  > >  > >
>  > >  > >  > > In the Debug Sampler, I get the following:
>  > >  > >  > >
>  > >  > >  > > JMeterVariables:
>  > >  > >  > > CustomerCode=Performance 1
>  > >  > >  > > DataFile=H:\Projects\Online Long Term Archive\Testing\JMeter
>  > >  > >  > > Scripts\IPOnline-JMeter-Scripts\resources\Performance 1\Lockbox
>  > >  > >  > Search.csv
>  > >  > >  > > JMeterThread.last_sample_ok=true
>  > >  > >  > >
>  > jmeterthread.pack=org.apache.jmeter.threads.samplepack...@94607b
>  > >  > >  > > LockboxSearchFile=Performance 1\Lockbox Search.csv
>  > >  > >  > > LogonName=Perf01
>  > >  > >  > > Password=<password for Perf01>
>  > >  > >  > >
>  > >  > >  > > I do not get the siteLockboxID, DateFrom, or DateTo variables
>  > >  > defined.
>  > >  > >  > >
>  > >  > >  > > When I turn on logging, I have the following in the log file:
>  > >  > >  > >        ERROR - jmeter.config.CSVDataSet:
>  > >  > java.io.FileNotFoundException:
>  > >  > >  > > H:\Projects\Online Long Term Archive\Testing\JMeter
>  > >  > >  > > Scripts\IPOnline-JMeter-Scripts\${DataFile} (The system cannot
>  > find
>  > >  > the
>  > >  > >  > file
>  > >  > >  > > specified)
>  > >  > >  > > 2009/09/09 14:03:30 ERROR - jmeter.threads.JMeterThread: Error
>  > while
>  > >  > >  > > processing sampler 'View Lockbox Search' :
>  > >  > >  > > java.lang.IllegalArgumentException: protocol = http host = null
>  > >  > >  > >
>  > >  > >  > > So, it appears that while the resourcePath is getting resolved
>  > >  > correctly
>  > >  > >  > in
>  > >  > >  > > the module, the DataFile is not getting resolved during
>  > processing.
>  > >  > >  > >
>  > >  > >  > >
>  > >  > ---------------------------------------------------------------------
>  > >  > >  > > To unsubscribe, e-mail:
>  > [email protected]
>  > >  > >  > > For additional commands, e-mail:
>  > >  > [email protected]
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  >
>  > >  > >  >
>  > ---------------------------------------------------------------------
>  > >  > >  > To unsubscribe, e-mail:
>  > [email protected]
>  > >  > >  > For additional commands, e-mail:
>  > [email protected]
>  > >  > >  >
>  > >  > >  >
>  > >  > >
>  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: [email protected]
>  > >  > For additional commands, e-mail: [email protected]
>  > >  >
>  > >  >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [email protected]
>  > For additional commands, e-mail: [email protected]
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to