Hi,

Why you don't compute your csv file to generate a new csv file with one
variable by line?

After you can use the new csv file in a "CSV Data Set Config" with "Stop
thread on EOF?" parameter to true



Le ven. 24 avr. 2020 à 17:25, _elgato <[email protected]> a écrit :

> Hi again,
>
> I was finally able to do this using a JSR233 Sampler with the
> following parameters:
>
> ${__split(${__StringFromFile(C:\test.csv)},LIC)};
>
> Which will read a line from C:\test.csv, split it each comma and save
> a list in the LIC variable. However I don't think this is a good
> practice and would like some input if possible.
>
> I would like to create a script that will read a line from the csv,
> split it each comma and save an array in a variable which will be used
> later in a ForEach controller.
>
> This is the JSR233 sampler: https://i.stack.imgur.com/OwBDq.png
> Here is the ForEach controller: https://i.stack.imgur.com/mDyzy.png
> And here the current value of the list is being used in an HTTP
> sampler: https://i.stack.imgur.com/dp5ql.png
>
> If anybody could at least tell me where to start, it would be much
> appreciated.
>
> Thank you.
>
> On Wed, Apr 22, 2020 at 5:25 PM _elgato <[email protected]> wrote:
> >
> > Hi everyone,
> >
> > I have to create a test which will send some HTTP requests. The number
> > of requests will depend on the number of columns in a CSV file so that
> > a request will be sent for each cell in a row. The purpose here is to
> > be able to use different CSV files with a variable number of columns .
> >
> > I am trying to set the test using ForEach controller, however I am
> > having trouble setting the loop.
> >
> > The hierarchy on the test is:
> > TestPlan
> >     Thread Group (one CSV row per thread)
> >         CSV Data Set Config
> >         ForEach controller (for each row in CSV file)
> >             HTTP request (send one per cell in row, making use of cell
> > value as variable)
> >
> > What is the best approach to do this?
> >
> > Thank you.
> > Regards.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to