Recently in the company want to do under pressure or load test, of course, my first thought is to use JMeter, have known it before, maybe it can meet the basic testing needs. You need to know it before you use it. Go to the official website to download the latest version: HTTP://JAKARTA.APACHE.ORG/SITE/DOWNLOADS/DOWNLOADS_JMETER.CGI, currently the latest version is Jakar
Recently in the company want to do under pressure or load test , of course, my first thought is to use JMeter, have known it before, maybe it can meet the basic testing needs . You need to know it before you use it.
First to the official website to download the latest version: HTTP://JAKARTA.APACHE.ORG/SITE/DOWNLOADS/DOWNLOADS_JMETER.CGI, the latest version of the current is jakarta-jmeter-2.7.
After running Bin/jmeter.bat, let's look at a few terms:
1. Thread Group: Each task in the test has to be processed by the thread, and all of our later tasks must be created underneath the thread group. You can build it with the Add Thread Group, test plan, and then there are several input fields in the Thread Group panel: Number of threads, ramp-up Period (in seconds), number of loops, where ramp-up Period (in seconds) Indicates that all threads are created within this time. If there are 8 threads, ramp-up = 200 seconds, then the thread has a start interval of 200/8=25 seconds, and the benefit is that the server will not have too much load at first.
2, Sampler (Sampler): It can be considered that all test tasks are assumed by the sampler, there are very different, such as: HTTP request.
3. Assertion: The results of the request returned by the sampler are judged correctly.
4, Monitor: Its function is to the sampler request results display, statistics some data (throughput, kb/s ...) such as
First these concepts. Here's a try:
Add a thread group, right-click Test Plan, add-on thread group, number of threads is 2,ramp-up=0, cycle count = 5; Add Sampler: Right-click Thread Group, add->sample->http request,Web Server localhost, port 8080, protocol HTTP, Path/index.jsp, add Monitor, right-click Thread Group, add->monitor-> Graphics Results (second), and then add a summary report Monitor
Then, run-and-start, you can see some content in two monitor, such as:
The main test components of JMeter are summarized as follows:
1. The test plan is the starting point for testing using JMeter, which is the container for other JMeter test elements.
2, the thread group represents a certain number of concurrent users, it can be used to simulate concurrent users to send requests. The actual request content is defined in sampler, which is contained by the thread group.
3, monitor is responsible for collecting test results, but also told the results show the way.
4. The logic controller can customize the behavior logic of the JMeter sending request, which is used in conjunction with sampler to simulate complex request sequences.
5. Assertions can be used to determine if the result of the request response is as expected by the user. It can be used to isolate the problem domain, i.e. to perform a stress test if the function is correct. This restriction is very useful for effective testing.
6, configure the components to maintain sampler required configuration information, and according to actual needs will modify the content of the request.
7. The predecessor processor and the post processor are responsible for completing the work before and after generating the request. The predecessor processor is often used to modify the requested settings, and the post processor is often used to process the response data.
8. The timer is responsible for defining the delay interval between requests.
Translated from: http://www.ltesting.net
Getting Started with JMeter