Hi Owen,

I couldn't find information about this. Do you mean setting the Input
variable prefix as "COLUMN" or "COLUMN1, COLUMN2,..., COLUMNN". Or
maybe setting the CSV file with column names "COLUMN_1, COLUMN_2,
COLUMN_3," etc

By the way, I recognize I did not explain that part very well. The CSV
file will always have the same number of column, but I want to be able
to run the testplan with a CSV file with 4 columns, later changing the
CSV file to another one that would have 8 columns, etc.

Could you explain how to set the input fields part?

Thanks a lot for your help.

On Sat, Apr 25, 2020 at 3:11 AM Owen Pahl <[email protected]> wrote:
>
> Hi _elgato,
>
> Why not name your data columns as per the input fields for the foreach loop?
> https://jmeter.apache.org/usermanual/component_reference.html#ForEach_Controller
>
> Although you would need to see how well the CSV Data Set Config
> handles variable number of rows, I would think (hope?) that it sets
> the empty ones as null.
>
>
> Cheers,
> Owen
>
> On Sat, 25 Apr 2020 at 06:32, _elgato <[email protected]> wrote:
> >
> > Hi Antonio,
> >
> > the csv consists of 20 lines with some columns and I need to send an
> > HTTP request with the same user for each column, that's why I cannot
> > use a csv file with only one column.
> >
> > Regards.
> >
> > On Fri, Apr 24, 2020 at 5:30 PM Antonio Gomes Rodrigues
> > <[email protected]> wrote:
> > >
> > > 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]
> > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > 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