I have been using AB to do simple service interface testing, AB features strong, easy to use, but not to generate thematic maps and tables and other functions, so we decided to use JMeter as our testing tool. Next, we will detail the steps used by JMeter, mainly including: JMeter deployment, simulating user concurrent access, HTTP test requests, monitoring test results.
1, jmeter deployment installation.
1.1 JMeter Download
Address: Http://mirror.bit.edu.cn/apache//jmeter/binaries/apache-jmeter-2.13.zip
1.2 JMeter use
Unzip the Apache-jmeter-2.13.zip.
To the bin directory, click the Jmeter.bat file to open JMeter.
JMeter opens with the following interface:
1.3 jmeter Feature description.
The following various performance tests or functional tests are supported.
- Web-http, HTTPS
- Soap/rest
- Ftp
- Database via JDBC
- Ldap
- message-oriented Middleware (MOM) via JMS
- MAIL-SMTP (s), POP3 (s) and IMAP (s)
- MongoDB (NoSQL)
- Native commands or shell scripts
- Tcp
2, JMeter use and test.
2.1 Simulating concurrent user access
Right-click Test Plan Add Threads (Users) >>setup the Thread Group button, as shown in:
Set the number of thread pools and loop tests to modify the thread pool name, such as:
(Note: This column is tested with one thread)
2.2 HTTP Test Request
After the thread group is set up, you can set the HTTP request sample settings. Right-click on thread Group Add "Sample>>http Request:"
Set HTTP request related parameters, including server IP, port, address, protocol, parameters, etc. There are two ways to address the parameters: A, put directly at the end of the address B, by adding a parameter surface version to set.
Ok,http request Setup is complete.
2.3 Monitoring Test results
After the HTTP request is set up, the monitoring results control is set and the SOLR service interface can be tested. The monitoring results control mainly includes:
Common components are: aggregated reports, graphical results, view result trees. which
Aggregation reports, mainly used to represent the summary information of the test, mainly include: request format, average response time, QPS, sent data volume information, etc., as follows:
Query the result tree to display each HTTP request in a tree, click on each tree node to view information such as HTTP request status, content, and so on, as shown in:
To view HTTP response information:
viewing HTTP request Information
Sampler results:
Graphical results, showing the performance test throughput, average response time, deviation, etc. in a thematic diagram.
In short, JMeter has a lot of powerful features waiting for us to explore. As a home-standing performance test weapon, you deserve it.
Testing the SOLR service interface with JMeter