Detailed explanation of JMeter calling java script process

This article mainly introduces the detailed explanation of JMeter calling java script process. It is introduced in great detail through example code, which has certain reference value for everyone's study or work. Friends in need can refer to it

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

1. JMeter call Java file

1>. Create a new Java script as follows:

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

3>. Run the script to view the result tree

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

The above is the whole content of this article. I hope it will help you in your study, and I hope you will support us a lot.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>