magento2: Jmeter error

Using benchmark.jmx from CE setup/performance-toolkit folder

jmeter.bat -n -t benchmark.jmx -j jmeter.log -l jmeter-results.jtl -Jhost=XXXXXX -Jbase_path=/ -Jadmin_path=backend -JsetupAndTearDownThread=10 -Jramp_period=300 -Jusers=1000 -Jorders=100000 -Jadmin_user=admin -Jadmin_password=XXXXXX -Jrequest_protocol=https

After small time test fails.

On jmeter.log I can see error:

WARN o.a.j.p.j.s.BeanShellSampler: Exception executing script. org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import java.util.ArrayList; ArrayList categoryUrlKeysList; // If it is first ite . . .

Small investigation, error is here (and on other interation lists)

// If it is first iteration of cycle then recreate category url key list if (1 == Integer.parseInt(vars.get("category_url_key_counter"))) { categoryUrlKeysList = new ArrayList(); props.put("category_url_keys_list", categoryUrlKeysList); props.put("category_url_key", vars.get("category_url_key")); } else { categoryUrlKeysList = props.get("category_url_keys_list"); }

It seems, that if condition is logically correct, but in execution - it fails. (I’m not java developer, but error says, that categoryUrlKeysList isn’t created)

If I add ArrayList categoryUrlKeysList; before if condition I’m do not get errors, but get test exit (due to no categories in benchmark workflow)

Same error, if using EE setup/performance-toolkit folder

Using 2.2.3 CE, but it’s error/bug in benchmark.jmx Using Jmeter 2/3/4

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 16 (13 by maintainers)

Most upvoted comments

JMeter 5 is not supported. Use JMeter 3.1

I’m getting the same error. Can varnish cause this error?

@mslabko yes, at the time, when I wrote this issue I was using benchmark_2015.jmx.

I’m getting the same error

2018-03-21 23:10:40,520 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: props.put("category_url_key", vars.get("category_url_key")); props.put("category . . . '' : Method Invocation props.put 2018-03-21 23:10:40,520 WARN o.a.j.p.j.s.BeanShellSampler: Exception executing script. org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: props.put(“category_url_key”, vars.get(“category_url_key”)); props.put("category . . . ‘’ : Method Invocation props.put