Article 1-Understanding Jmeter and Article 1-jmeter

Source: Internet
Author: User

Article 1-Understanding Jmeter and Article 1-jmeter

Jmeter is a Java-based stress testing tool developed by Apache. It was initially designed for Web application testing, but later expanded to other testing fields. It can be used to test static and dynamic resources, such as static files, Java small service programs, CGI scripts, Java objects, databases, and FTP servers. JMeter can be used to simulate huge loads on servers, networks, or objects, from different pressure categories to test their strength and analyze the overall performance. In addition, JMeter can perform functional/regression tests on the application and verify that your program returns the expected results by creating scripts with assertions. To maximize flexibility, JMeter allows the use of regular expressions to create assertions.

  

The structure of Jmeter is http://jmeter.apache.org/download_jmeter.cgi:

 

Directory structure:

1. The bin directory is the Jmeter running Directory, which stores the Jmeter running log [jmeter. log] and various command tools.

2. the docs directory is the Jmeter document directory, which stores the Jmeter Api

3. the extras Directory provides support files for Ant and can be used for continuous integration.

4. The lib directory is the Jmeter class library Directory, which stores the Jmeter class library and ext plug-ins.

5. printable_docs is the Jmeter user manual.

 

Introduction to Jmeter Interface

Run Jmeter. bat in the bin directory of jmeter. The following interface is displayed:

 

Plugin installation

Jmeter plug-ins are easy to install. You only need to download and decompress the corresponding plug-ins.

1,: http://jmeter-plugins.org/downloads/all/

2. Unzip the package to the Directory D: \ software \ apache-jmeter-2.7 \ lib \ ext.

3. Restart Jmeter.

 

Common Jmeter controls

 

1. Test Plan)

A test plan contains all controls, attributes, and variables. Therefore, a jmx has only one test plan. Variables can be defined in the test plan, jar packages can be introduced, and test modes can be edited.

2. workbench

Control temporary storage area. During the test, you can place the temporarily unused controls in the area. After the test is completed, the controls are placed back to the original location.

3. thread group

Understanding: in a virtual user group, the number of threads in the thread group does not change during running.

A. Right-click to create a thread group, for example:

 

B. SetUp Thread Group

Test the initialization operation, that is, the content executed before the thread group starts.

C. TearDown Thread Group

The operation after the test is executed, that is, the content executed after the thread group is executed.

4. Sampler

 

A. http request-an http request

B. Java request-execute a custom Java class

  

Jmeter Functions

Function Assistant

Open Location: Option-function Assistant

 

 

Function example:

$ {__ Time (YMD)}: current date function

$ {__ Time (YMDHMS)}: current four functions

$ {__ MD5 ($ {fkeystr_no_register})}: MD5 encryption function

Function call

1. Select the function to be used.

2. Enter the value of the function to be used.

3. Click Generate

 

4. Copy the obtained string to the desired location

Summary: The basics are briefly described. The next article is about practice!

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.