jMeter CSV_Data_Set config and XML dynamic binding -
i using jmeter -csv_data_config element bind csv data xml template shown below. works beautifully when data in excel cells static ie.. know set of columns. eg. 6 cols in csv file bind 6 variables in xml file.
lets end user decides have 15 cells of data in csv file. can make jmeter script dynamic add new xml elements eg.item new attributes based on number of cells in csv file ?
i think beanshell script might if not ? not sure how .. -much appreciated !
personally use following approach getting data csv file unknown number of columns:
- user defined variables (defined variable
n
value of0
) - while controller
- counter (start: 1, increment: 1, reference name: n)
- samplers data-driven logic
and use following line condition while controller
${__javascript("${__csvread(/path/to/your/file.csv,${n})}"!="",)}
see __csvread() function documentation more details.
Comments
Post a Comment