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 jmetersaikrishna– saikrishna2017年05月07日 10:39:52 +00:00Commented May 7, 2017 at 10:39
2 Answers 2
You need to add some extra configuration so Flexible File Writer could save your planNum
variable.
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
- Use
variable#0
instead of${planNum}
in the Flexible File Writer
References:
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– Kate Paulk2018年01月25日 12:24:07 +00:00Commented Jan 25, 2018 at 12:24