I am trying to perform load test using jmeter. I have my script to extract and generate .json output file which is using ruby. Now i want to use this output.json ( which changes with every thread event) in jmeter and run it with 100 threads. How do I call .rb using jmeter gui?
2 Answers
1
votes
You can use OS Process Sampler to invoke whatever external command or program from JMeter test script.
Example configuration:
Change:
c:\apps\ruby\bin\ruby.exeto the actual path to yourrubyexecutablec:\temp\script.rbto the actual path of your .rb script
More information: How to Run External Commands and Programs Locally and Remotely from JMeter
0
votes
You can execute ruby in JMeter using jruby script engine
Dowonload jruby-engine.jar
Copy to JMeter lib directory with ruby relevant jars (as jruby-core)
In JSR223 choose language as
jrubyWrite your ruby script and run test
Notice that JRuby find predefined variable using $ prefix:
$log.info("Hello from JRuby");
