Using JMeter to test JSP application performance

Source: Internet
Author: User
Tags add http request thread window port number
Js| Program | performance

If you want to test your JSP application performance, then you can use JMeter, which is an open source product developed by the Apache Software Foundation. JMeter allows you to develop test scenarios to test accessible HTTP, FTP and the JDBC database service. JMeter can use cookies and URL overrides to handle servlet validation, so performing well when testing a JSP application. Its download address is: Http://jakarta.apache.org/jmeter

Here's a look at JMeter, you can write a very simple JSP page to use JMeter for testing, such as: test.jsp. To test the page, we first generate a thread group consisting of 5 threads, each looping 100 times. This will simulate the effects of 5 browsers, Run the test scenario 100 times per browser.

Running Jmeter.bat shows a GUI window built by a Java swing technology. Right-click the tree-like test plan on the left, select Add-> Thread Group option to add a thread group, fill 5 in the thread number, or simulate 5 browsers; in ramp-up Fill in the 5 in the Period (in seconds) and fill 100 in the cycle times.

Then you need to generate an HTTP request under the thread group and configure it to access your test.jsp page. Right-click the thread group and select Add->sampler->http request. Fill in your hostname or IP in the server name or IP, In this example I wrote the localhost, the port number please fill in according to the situation, my is 8080; The protocol fills in HTTP, the method is get; The path fills your JSP page address according to your environment, I write the/test/test.jsp; other values are default.

Then add a report. Right-click the thread group and select Add-> listener-> Aggregation report. When we run this thread group, there are information about the minimum, maximum, and average response times to run the test page. If you need to write the contents of the report to a file, Then you can fill in the filename with the path and filename of the file you want to save, which is optional, of course.

Finally to the final step, click on the Run menu-> start to run the test scenario. It may take some time to run the test. When the test runs, you can view the results in the Aggregation Report window.

Not only can the aggregation reports be generated, but other reports can be generated, such as spline visualizer (spline-curve visualizer), and the settings and aggregation reports are similar.

JMeter function is far from this, there are many more outstanding functions, please study by yourselves. In addition to jmeter there are some other performance testing products, to understand the information of these products, please check:

Mercury loadrunner:http://www.mercuryinteractive.com/products/loadrunner/
Web performance, INC: http://www.webperformanceinc.com/



Related Article

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.