I. Introduction to automated test tools

Apache JMeter is a Java-based stress testing tool developed by the Apache organization. Used to stress test software, it was originally designed for Web application testing, but has since expanded to other testing areas. It can be used to test static and dynamic resources, such as static files, Java applets, CGI scripts, Java objects, databases, FTP servers, and so on. JMeter can be used to simulate heavy loads on servers, networks, or objects, test their strength under different stress categories, and analyze overall performance. In addition, JMeter can perform functional/regression tests on applications, verifying that your program returns the results you expect by creating scripts with assertions. For maximum flexibility, JMeter allows you to create assertions using regular expressions.

Apache JMeter can be used to test the performance of both static and dynamic resources (files, servlets, Perl scripts, Java objects, databases and queries, FTP servers, and so on). It can be used to simulate heavy loads on servers, networks, or objects to test their strength or analyze overall performance under different stress types. You can use it to do graphical analysis of performance or test your servers/scripts/objects under large concurrent loads.

The role of JMeter

1. Ability to perform stress and performance tests on HTTP and FTP servers, as well as any database (via JDBC).

2. Full portability and 100% pure Java.

3. Full Swing and lightweight component support (pre-compiled jars use Javax.Swing.*) packages.

4. Fully multithreaded frameworks allow simultaneous sampling of multiple threads and simultaneous sampling of different functions through separate thread groups.

5. Careful GUI design allows for fast operation and more accurate timing.

6. Cache and offline analysis/playback of test results.

High scalability of JMeter

1. Linkable sampler allows unlimited testing capability.

2. Various load statistics and linkable timers are available.

3. Data analysis and visualization plug-ins provide good scalability and personalization.

4. Features (including Javascript) that provide dynamic input to tests.

5. Sampler with scripting support (BeanShell support in 1.9.2 and above).

During the design phase, JMeter can act as an HTTP PROXY to log HTTP requests from IE/NETSCAPE and log files from Webservers such as Apache to reproduce HTTP traffic. When these HTTP client requests are logged, the test run can easily set the number of repetitions and concurrency (threads) to generate significant traffic. JMeter also provides visual components and reporting tools that show the performance of the server under different pressures.

Compared to other HTTP testing tools,JMeter’s main feature is its scalability. JMeter can automatically scan for plug-ins in.jar files in its lib/ext subdirectory and load them into memory for users to call from different menus.

meaning

 

1. Label: defined HTTP request name

Samples: Indicates how many requests were sent in this test

3, Average: the Average response time to a page

4, Min: the minimum response time to access the page

5, Max: the maximum response time to access the page

Error% : Number of incorrect requests/total requests

7. Throughput: Number of requests completed per second

KB/Sec: the amount of data received from the server per second

 




 

Second, environment building

1. Enter the official website:jmeter.apache.org/

2.

 

3. Configure environment variables

·1. Java environment variables (see another blog post)

Blog.csdn.net/tangcv/arti…

·2. Setting of jMeter environment variables

Right click on my computer/Properties/Advanced/Environment Variables

Set in the user variable:

 

Unzip apache-jmeter-4.0.zip to D: D:\apache-jmeter-4.0

Set the JMETER environment variables

In the user variable, create a new variable named “JMETER_HOME” with the value D:\apache-jmeter-4.0

Modify the CLASSPATH to add later; %JMETER_HOME%/lib/ext/ApacheJMeter_core.jar; %JMETER_HOME%/lib/jorphan.jar; % JMETER_HOME % / lib/logkit – 2.0. The jar

 

 

4. The localization

D:\apache-jmeter-4.0 in the bin directory, find jmeter. bat double click open

 

 

Option – — “Choose language – –” Chinese simplified