Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmeter not saving variables into CSV or XML files

Tags:

jmeter

I'm new to jmeter.

I understand that I can edit jmeter.properties and specify the names of "custom" variables that jmeter will save into its output files, for any given test run.

I've edited jmeter.properties to include this line:

sample_variables=DURATION

and I've also edited my test plan to include a Regular Expression Extractor that extracts a value from each response and stuffs it into a variable of that name.

enter image description here

I also added a "Simple Data Writer" to tell jmeter to write the data it collects to a file.

enter image description here

The output file gets created successfully, but it does not contain the variable I extracted.

What am I doing wrong?

I'm finding this impossible to google, because "save jmeter variable" doesn't constrain the situation nearly enough.

like image 817
Cheeso Avatar asked Jan 27 '26 11:01

Cheeso


1 Answers

My bad.

Jmeter was writing that variable out. I had to restart jmeter to get it to work.

I was misled by looking at the top of the output file - it contained output from a prior run, prior to my restart of the tool. After I Removed the existing output file, the new content in the output file showed the variable I expected.

like image 190
Cheeso Avatar answered Jan 30 '26 07:01

Cheeso



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!