Prerequisite: You need to prepare eclipse as a development tool, install the JDK, ready, and then start!
1, new Java Engineering bmirisjnijartest, new Lib directory, the JMeter installation directory under the Lib/ext package Apachejmeter_core.jar and Apachejmeter_ Java.jar copy to Lib, then import the jar package
2, Abstractjavasamplerclient is the core interface of Java request, implementation of interface Abstractjavasamplerclient,sampleresult between the start and end of the method can write test code
3. Generate the src code jar package Bmirisjnijartest.jar
4. Put the generated and referenced jar packages into the JMeter Lib/ext directory
5. Run Jmeter.bat under bin in JMeter installation directory
A. Test plan-Right-click-threads-thread Group
b, Thread group-right-click-sampler-java request
C, for example, you can select a custom test class at the class name, such as
6. After configuring the number and time of thread group execution, the test plan can be executed.
A brief introduction to the use of Java requests, understand the entire process, more practice to familiarize yourself with the entire test process, the next article describes how to stress test the database.
Second--jmeter testing Java requests