Stress Testing aims to test the software response speed, especially when a large number of concurrent users access the software in a short period of time.
JMeter is an open-source stress testing tool. The latest Release version is 2.3.4. It can not only test Web servers, you can also test the testing capabilities of multiple objects, such as databases, JMS, Web Service, LDAP, and JUNIT. : Http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
The following is a brief introduction to JMeter.
- The test plan is the starting point of the test and the containers of all other components.
- A thread group is a component used to simulate user concurrency. Every JMeter task is processed by a thread. A thread group has three attributes: thread count, Ramp-up Period, and loop count. The number of threads is the number of concurrent threads. Ramp-up Period indicates the length of time for creating all threads defined in the number of threads.
- Logical controllers can organize samplervers to make complex test requests.
- The Configuration component is used to configure the configurations required by the sampling device.
- The timer sets the interval between requests.
- A Preprocessor is generally used to modify a Request ).
- Sampler (Sampler) is the main execution component. Each samplezer can be monitored by the listener and the test results are generated.
- The post-processor is generally used to return the returned data (Response ).
- Assertion: determines whether the samplezer works normally.
- Listener, collect and organize test results, and generate files in XML, CSV, and other forms in a specified format.
You can add non-test elements to the workbench. The most important one is the HTTP proxy server.
The HTTP Proxy Server can be used to record test scripts. Set the proxy server of the browser to 127.0.0.1: 8080, and then start the HTTP Proxy Server of JMeter to record the operations performed in the browser. The HTTP Proxy server can set the inclusion mode and exclusion mode. I usually use the exclusion mode to exclude CSS, JS, GIF, and PNG.
This is the basic component of JMeter. Please look forward to the next article on how to use these components!