Is there a way to write variables from csv input file to the .csv output file?

i have input.csv with

planID |planNum
----   |----
1      | 123456

Also, I have user defined variable: varToFlexibleFileWriter, value: "some value"

I am using flexible File writer to write output file In Record each sample as, I have : ${varToFlexibleFileWriter}|\t|${planNum}|\r\n

but in outfile I see:

userDefinedVar | planNum
some value     | ${planNum}

User defined variable is displayed as expected, but there is no value for planNum.

Is there a way to make flexible file writer to write variable values from input file? Thanks

  • You can use csv configuration in jmeter
    – saikrishna
    May 7 '17 at 10:39

You need to add some extra configuration so Flexible File Writer could save your planNum variable.

  1. Add the next line to user.properties file (it is located in JMeter's "bin" folder)


    JMeter restart will be required to pick the property up. Alternatively you can define the property by passing it via -J command-line argument like:

    jmeter -Jsample_variables=planNum -n -t yourplan.jmx -l results.jtl

  2. Use variable#0 instead of ${planNum} in the Flexible File Writer



Every answer I see in all the internet avoids the main question!

How does one write a dynamic values to the output?

Clearly the original author of the thread wanted to submit changing values into the output. (csv, etc...) From every answer I see, the end result is NO, you cannot write changing values to Flexible File Writer!!!

If this had been the intent of the developer, they would had allowed custom ${vars} to be used in the plugin. EVERYTHING is static output. The only dynamic values are the tiny subset of vars that can be used and cannot be modified.

  • How does this add to the accepted answer?
    – Kate Paulk
    Jan 25 '18 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.