Reputation: 259
In JMeter, when using "Save Responses to a File" to store http responses, how can I increment the file name while attaching a custom suffix to the end of the file names? Here was my scenario
However, I had trouble with the filename incrementing at the end of the file like this:
testFile.txt1
testFile.txt2
testFile.txt3
I wanted this:
testFile1.txt
testFile2.txt
testFile3.txt
Also, if I did not uncheck "Don't add suffix", then "octet-stream" was my file type, which is not what I wanted:
testFile1.octet-stream
testFile2.octet-stream
testFile3.octet-stream
So, how can I properly increment the file name with the correct file extension?
Upvotes: 2
Views: 5906
Reputation: 168082
I'd suggest using __counter() function which can be either virtual-user-specific or global as follows:
testFile${__counter(FALSE,)}.txt
- for GLOBAL counter
testFile${__counter(TRUE,)}.txt
- for SEPARATE counter per Virtual User
Upvotes: 4
Reputation: 259
I solved this by doing the following:
So, keeping that in mind, my files were named all correctly from:
testFile1.txt testFile2.txt . . . testFile15.txt
Hope this helps someone as I struggled with this for a little bit :-).
Upvotes: 2