Available in Standard Set
Flexible File Writer since 0.4.1
JMeter has very simpe test results writing capabilities with Simple Data Writer plugin. File formats restricted to XML and CSV, fields order predefined. So you may find Simple Data Writer not enough for your task.
Flexible File Writer plugin allows writing test results in flexible format, specified via GUI.
Make note that JMeter variables/functions in filename field processed only once when test starts and file opened for writing.
Header and Footer since 0.5.2
If your format requires some header and/or footer, you may specify it in corresponding fields. FFW will write header once it opened file and footer right before closing it.
Record specification may consist of fields specification and string constants. Fields are separated from constants with '|' symbols. Plugin will not add any extra bytes to file, so you must specify newline characters manually (\r, \n, \t works for newlines and tabs).
For example, simple tab separated file specified as:
If you want to have '|' symbol itself to be written to file, use '||' in record specification.
There is special property named kg.apc.jmeter.reporters.FFWBufferSize with default of 10KB. This property controls the size for the buffer used to compose record to write to file. See https://groups.google.com/forum/#!topic/jmeter-plugins/Mldv8vs2L3g for some more details.
Saving JMeter Variables with Flexible File Writer
Jmeter have feature to specify some variables to be saved in result files. You may find here JMeter doc on setting up saving. Shortly is you have to specify JMeter property sample_variables to save variables by name, for instance, with command line property setting -Jsample_variables=var1,var2, or just in user.properties file. It turns out that JMeter have no API to change sample_variables setting during runtime, so we have to rely on pre-run property setting. Flexible File Writer can then use those variables to save in file, you need to specify field variable#0 in record specification. Variable indexes are zero based, e.g. var1 have index '0', var2 have index '1'.
Example and Tutorials
On this page: