[Jmeter]jmeter First Experience (Jmeter under Windows)

Source: Internet
Author: User

first, the environment preparation

1. Installing the JDK (Portal: http://www.oracle.com/technetwork/java/javase/downloads/ jdk8-downloads-2133151.html Select Jdk-8u101-windows-x64.exe), after the installation is complete, and configure the correct environment variables;

2, download JMeter installation package (Portal: Http://mirrors.cnnic.cn/apache//jmeter/binaries/apache-jmeter-3.0.zip);

3, unzip the installation package can be;

4, modify the JMeter configuration file jmeter.properties, parameter cookiemanager.save.cookies=true (not required).

Second, start JMeter

1, enter the "Apache-jmeter-2.8\bin" directory, the implementation of "Jmeter.bat" can

Three, Brief introduction

1, Language choice: Choice language Choice "choose their own appropriate language;"

2. Jemeter interface Components and meanings:

A, select the test Plan "right-click" The Component interface appears

I.threads: This component is mainly used to control the number of threads that are generated when the jmeter is concurrent, and there is only one component (thread group) under its next-level menu, so it is understood that each thread is a virtual user. all other types of components must be child nodes of the (thread group) node.

Ii. Hive: Working with the sample component to configure how sample is to initiate a request access server, the main feature of this thing is that some of the common configurations of sample can be conveniently managed in one element, and the hive is scoped. The same relationship between the scope and the tree, the greater the scope of the ancestor node, the closer the leaf node

The smaller the scope, the higher the configuration of the parent scope can be replicated.

Iii. timers: This is primarily used to regulate (thread groups) the time interval at which the thread runs the test logic (for example, making a request) every time. Of course, there are many types of timers below, their main function is to adjust the time interval, but the strategy between the components are very different.

Iv. the predecessor processor and the post processor resemble a hook that executes some script logic before and after the test is executed. This component I have not used specifically, but the general function is this, non-focus components.

V.sample: May not appear in the Sample, need to be added on (thread group) can, see figure

Sample indicates that the client sends a request to the server in some format or specification, so we see a variety of sample, which has two HTTP-related. Generally with httpclient function and efficiency will be stronger.

Vi. assertion: Means to determine whether the returned result satisfies expectations after the request has been sent for sample.

VII. Listener: This component is different from the usual web-based listener, he is accompanied by the Jemeter test run to crawl data from the runtime of a component, often using the aggregation report component, from the inside can be counted to test the TPS, response time and other key test data.

3. Example Operation:

A, select thread group click Run

b, viewing the results is to view the results of the operation (more logs are recommended to tick "error log only"):

C, aggregated reports to see how it works:

4. Operation and stop

5, clear the cache (it is recommended to clear after each execution):

[Jmeter]jmeter First Experience (Jmeter under Windows)

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.