jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: Problem with CSVRead and multithread
Date Tue, 01 Aug 2006 13:30:24 GMT
On 01 Aug 2006 15:25:57 +0200, <> wrote:
> Hello,
> I've encountered a non-trivial problem I cannot solve - how to open many times the same
file (each
> in separate thread) or - how to manage file pointer for one opened file for each
> thread separately?
> Here is a short description of my application:
> It's a bot created to perform tests. Bot is created based on jmeter. The structure
> of test is simple:
> - each test plan (scenario) consists of sequence of test modules.
> - each module represents a bit of test (e.g. - loading a single webpage)
> Both - scenarios and modules have unique IDs. Scenario is defines as sequence of
> modules' IDs, module - as java codes (Beanshell samplers).
> While running a test user has to enter at least a scenario ID. Bot reads (CSVRead)
> line of definition of scenario (module IDs), and then loads (BeanShell sampler) and
> runs the appropriate module. Module returns at end status of operation, that
> determinates the following operations (return with Err or continue to the happy
> end).
> As long as I run one-thread tests all seems to be working properly. The problem
> begins in case of number of threads. CSVRead allows to manage file pointers in each
> thread independently but - here is the catch - each time I load value from CSV in
> new thread - I'm given not the first value from file, but the next to previously
> read by another thread. So - I cannot operate on the same whole file with number of
> threads.

Did you remember to add a next() command?

> I've tried to use *ALIAS statement, but it doesn't work for me. There are no
> examples of *ALIAS in manual nor in mailing lists.
> I've tried also CSV Data Set Config and StringFromFile either - but both of them are
> unusual in this context.

CSV Data Set  is the preferred way to read from a file.

> Perhaps is there any undocumented function of CSVRead allowing to fetch the value in
> next thread from the very beginning of file?
> Can anybody help me? Any suggestions are welcome.

Use CSV Data Set instead.

> Greetings,
> mart
> ------------------------------------------------------------------------
> Szybko i tanio ubezpiecz samochod!
> Kupno polisy zajmie Ci 15 minut! Kontakt przez telefon albo Internet.
> Kliknij i sprawdz:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message