I. Description of the toolApache JMeter is a 100% Java desktop application designed to load the features of the tested software and measure the performance of the software being tested. The design JMeter was originally designed to test Web applications and later expanded other functions. JMeter can perform performance tests on static and dynamic resources (Servle
Purpose: To test the Java programDirectoryFirst, the core stepsSecond, examplesThird, JMeter Java Sampler IntroductionIv. bring your own Java Request SamplerFirst, the core steps1. Create a Java project;2. Add the jar file in the JMeter Lib directory to the build Path of this project;3. Create a class and implement the Javasamplerclient interface or inherit abstractjavasamplerclient, and rewrite it;Public A
ObjectiveJMeter is an open source tool for performance testing, stress testing, and is being tested by a large number of testers to test product performance, load, and more. JMeter In addition to the powerful presets of various plugins, various visual charting tools, there are some inherent flaws, such as:
We often can only analyze the performance of the same deployment in the report, it is inconvenient to make a vertical comparison, for
JMeter Execution Order rules:
Configuring components
Front-facing processor
Timer
Sampling device
Post processor (unless server response is empty)
Assertion
Listener
The timer, assertion, pre/post processor is executed only when the sampler is present in the scope, and the logic controller and sampler are executed in the order in which they appear in the test tree. Other test elements are executed according to their own scope
first , the question:When I was doing performance testing, I used jmeter to make 100 concurrent, with 100TPS pressure to test 10 minutes, but the pressure has been fluctuating, and fluctuations in the JMeter very card, such as:Periodic TPS fluctuationsVarious speculations:So began to look for various reasons for the environment, at first thought is JMeter connect
1. Install the JDK and configure the environment variablesTake 1.8 as an example:(1) installation of jdk1.8;(2) In the system variable click New, variable name fill java_home, variable value fill JDK installation path "C:\Program files\java\jdk1.8.0_40", environment variable position 1Figure 1(3) In the system variable, click the new variable name to fill in the Classpath, the value of the variable filled ".; %java_home%\lib;%java_home%\lib\tools.jar
processor is often used to process the response data.6. Assertion--to determine if the result of the request response is as expected by the user. It can be used to check the validity of the test, isolate the problem domain, and perform the stress test if the function is correct.7, the listener-responsible for collecting test results, and in a variety of ways to display.Simple example:1) First add a thread group and set the thread concurrency amount:w
:
Control Thread Group
Set the number of threads
Setting the ramp-up cycle
Set the number of cycles to test execution
Each thread executes the test plan completely and independently without affecting other threads. Multithreading can be used to simulate concurrent connections to your server programs.Ramp-up period tells JMeter how long it takes to "ramp-up" to load all the threads, if 30 threads are used, and ramp-up period i
1. Custom Jar Package Introduction2.pom Advanced Configuration3.git Project Upload4. Using Nmon to monitor resources5.Jenkins Parametric transferIssue: Jmetermavenplugin+jenkins Integration performs Java interface class performance testing,1. First customize the Java interface test class, debugging through the export of a separate test class jar package, and copy the jar package to JMeter. /lib/ext directory. (Note copy other dependent jar packages at
. Implementation: Here we record the default fill in the Java protocol is filled with: HTTP method is: GET Content encoding: Encoding can not fill in the path: that is, the path of the page, the following redirection and other options can be checked as required, Here we keep recording without modification. Parameters parameter: That is, the parameters sent along with the path and the proxy server under the file can be ignored, fill in as required. C, parameterized as follows, we parameterize
configured to run how many threads, each thread loop how many times, all the number of threads total boot time (ramp-up period) and so on.2. ControllerThis includes logical controllers and sampler, which are used for some logical control, such as rotations, conditions, loops, and so on. Sampler is really a "work" of "sampler", such as "HTTP request", is to carry out an HTTP request.3, ListenerListener to listen to the request process can be simply understood to obtain the results of the Dongdon
begins, JMeter will wait as necessary until the start time is reached. At the end of each loop, JMeter checks to see if the end time has been reached and, if so, stops running, or the test continues until the iteration limit is reached. 3, the controller (controllers) JMeter has two kinds of controllers: Sampler and logic controller. The processing of these
Jmeter a ' Jmeter profile Apache Jmeter is Apache, open source. Pure Java Desktop App installation configuration JDK download installation
jmeter tool composition and thread groupsResource Builder: The resource code used to generate the server and the load machine during the test. User runner (Vugen in LR): Typically a
JMeter Learning (ii) Recording script, JMeter learning recording script
Environment
Badboy Version 2.1.1
jdk:1.7.0_67
Apache JMeter-2.11
----------------------------------------------------------------------------------------------------
JMeter recording scripts There are several ways, the most common method is to us
Before using JMeter to do performance testing, basically use their own laptop.The following analysis is carried out considering the network transmission and utilization of system resources:1 on the notebook, start-cmd "ping Server" to get the transfer time. "Ping the Server" on a Linux machine to get the transmission time, the two time is similar, think does not affect the test result2 generally I used to test the Linux test machine and notebook compu
In general, the programming tools IDE provides the appropriate debugging modules for developers to use in order to locate the problem more quickly. So what debugging tools does JMeter provide for us to use while jmeter writing test scripts?JMeter commonly used debuggers have the following five kinds:1. View tree: See the result trees. Including request informatio
Instance:The service is: the input two parameters via IO to the file;1. Open MyEclipse, write Java codeService: Packagetest;ImportJava.io.File;ImportJava.io.PrintWriter; Public classOutputservice { Public Static voidOutput (String filename,intAintbthrowsException {PrintWriter out=NewPrintWriter (NewFile (filename)); Out.write (A+ ":" +b); Out.close (); }}Test class: Packagetest;Importorg.apache.jmeter.config.Arguments;Importorg.apache.jmeter.protocol.java.sampler.JavaSamplerClient;ImportOrg.a
Official website: http://jmeter.apache.org/building.html1, in Apach official website download source code: http://jmeter.apache.org/download_jmeter.cgiApache-jmeter-2.11_src.tgz(try to download the latest version), unzip it after downloading2, this machine follows ant: :http://ant.apache.orgAnt Installation Method:Http://www.cnblogs.com/yuzhongwusan/archive/2013/03/26/2982411.html3, the understanding and introduction of Build.xml file: Http://zh
The JMeter test plan has an option called the "function test mode", which , if selected, causes the JMeter to record every sampled data returned from the server. If you select a file in the test listener, the data will be written to the file. This is useful if you try a smaller test to ensure that the JMeter is configured correctly and that your server is returni
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.