Search code examples
multithreadingconcurrencyjmeter

JMeter properties writing concurrently


I need to Write to CSV file in JMeter from multiple threads concurrently. Of course, it'll cause a race condition, so I'm thinking to take the strategy from Jmeter write data into excel sheet from multiple thread groups executing concurrently :

A better solution would be passing values from one group to another using in-memory approach, to wit without any interim files. You can use __setProperty() function to define the property

I.e., I plan to define an array in properties and each thread will append its record to the array, then write such array out once in the end (don't know how yet as I can't use a tear down thread).

So,

  • When each thread try to append to array in properties, does JMeter provide any concurrency protection, or I need somehow protect it myself?
  • What's the best approach to write the array out once in the end of the test?

Solution