Forum Discussion

BhuvanShanmugam's avatar
BhuvanShanmugam
Contributor
16 years ago

Re: different data source for each thread in a load test

Hello,

I have a similar requirement to (http://www.eviware.com/component/option ... 14#msg2514)

I have a load test with one operation in it.
I want to run this operation in 10 threads; but each thread should take its data from a unique file.

Hoe can i do this?

I have managed to set up a single file with shared data source option, in which case, if there are 100 records in the file and 10 threads started, each thread runs 10 times with unique values.

However, I would like to set up each thread with a different input data source file. Is this possible?

I have a Pro version . FYI.

Thanks,
Bhuvan.

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Bhuvan,

    what you can currently do is use the ThreadIndex context variable in the name/path of the data source file, for example "datafile${ThreadIndex}.txt", which will evaluate do datafile0.txt for the default thread when running the testcase "alone", and corresponding datafileX.txt values when running with more than one thread..

    does that help?

    regards,

    /Ole
    eviware.com
  • Hello Ole,

    I suppose the ThreadIndex variable is an integer value. for a normal operation it is 0. When inside load test it takes values between 0 and n where n is the number of threads. Is my understanding right ?

    At present I have file names of the format fileXX.txt where XX can be from 00 to 99 to simulate 100 threads.

    I guess with your method I will have to rename the first 10 files from XX to X file name format.

    I shall try this when I switch back to the soapUI work.

    Thanks,
    Bhuvan.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    yes, this sounds like it should work.. let me know!

    regards,

    /Ole
    eviware.com