JMeter is a powerful tool to make tests. See here: http://jakarta.apache.org/jmeter/ for an official description.
Here at work, we use it for multiple purposes:
- non regression tests : a bunch of JMeter test files containing single use cases are run to test the commits to the CVS and see if anything has been broken by the changes
- performance tests : our front or back-end servers are stressed by JMeter test files ran from a dedicated injection server, spawning dozens of threads and getting their data from big CSV files
Recently, I came into a problem: JMeter was running very slowly. Where I expected something like 800 requests per seconds, it delivered only 3 or 4, which is quite low… After some research, I found the culprit: an “If” condition, evaluated at each request. By default, it uses a JavaScript syntax and, apparently, a JavaScript interpreter too. And this interpreter seems to be re-instantiated each time the condition is evaluated! This was why it could deliver so few requests per second.
I tried to bypass the JavaScript interpreter and checked the little box named “Interpret Condition as Variable Expression” and used the __jexl() function. And I nearly got the rate I expected at first.
Done.