Implementation of Java request in JMeter log

Source: Internet
Author: User

Implement Java request ideas in JMeter: Create a class with the framework package provided by JMeter, inherit the class Javasamplerclient override the following four methods of the class Getdefaultparameters () Runtest ( Javasamplercontext context) Setuptest (Javasamplercontext context) Teardowntest (Javasamplercontext context) The key is to construct the JMeter parameter by the Getdefaultparameters method, the parameters obtained from the JMeter, and the parameterized code is written to debug well, with the Ecipse export runnable jar method, the jar package and the dependency package are exported. Under the Ext folder of the Jemeter installation package, restart JMeter, that is, you can implement JMeter receive parameters, Call Java Script 1. Find the JMeter framework package, the following three packets are enough, jmeter3.3 cannot find another 2 packages in the JMeter installation package looking for the above Jar package Eclipse project right-import external jar Package

New Java class inheritance Javasamplerclient

Add the JDBC Jar package Java code according to the JMeter framework, write the Setup,teatdown,run method code to run at least once, no problem do the following, export the executable jar package from Eclipse, for JMeter call project right-click

This is the exported executable jar package and the dependent package folder

Import these 2 files into the following directory, JMeter expansion pack, each script has a separate folder, storage dependent package Restart JMeter, new Java request

Click Run, the database has added a new data, the script import successfully view the results tree does not see the Java request information, because the underlying is binary data, only the console can see SYSO printed information followed by the implementation of JMeter parametric entry

Implementation of Java request in JMeter log

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.