1

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

1
  • You can use csv configuration in jmeter
    – saikrishna
    Commented May 7, 2017 at 10:39

2 Answers 2

1

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)

    sample_variables=planNum
    

    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

References:

0

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.

1
  • How does this add to the accepted answer?
    – Kate Paulk
    Commented Jan 25, 2018 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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