JMeter call java script process details


This article mainly introduces the JMeter call java script process details, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to

JMeter is written in pure Java, so there are three ways to use java script: call. Java file; call. Class file; call. Jar file

1. JMeter calls. Java file

1> . create a new Java script with the following contents:

2> . new thread group > > add BeanShell sampler, debug postprocessor, and view the result tree. Write the BeanShell sampler as follows:

3> . run the script and view the result tree

The value of OOo in the result is 22, calling the. Java file successfully.

The above is the whole content of this article, I hope to help you in your study, and I hope you can support developeppaer more.