If you want to test your JSP Application Program Performance, then you can use jmeter, which is open by the Apache Software Foundation. Source code . Jmeter allows you to develop test solutions to test accessible HTTP, FTP, and JDBC database servers. jmeter can use cookies and URL rewriting to process servlet verification. Therefore, jmeter performs well in testing JSP applications. it's: http://jakarta.apache.org/jmeter
Let's take a look at jmeter. You can write a very simple JSP page to use jmeter for testing, such as test. JSP. to test this page, we first generate a thread group containing five threads, each with 100 cycles. in this way, the effect of each browser is simulated, and each browser runs the test solution 100 times.
Run jmeter. bat, a GUI window built by Java swing is displayed. right-click the test plan in the tree structure on the left, select Add> thread group option to add a thread group, and enter 5 in the number of threads to simulate 5 browsers; enter 5 in ramp-up period (in seconds) and 100 in the number of cycles.
Next, 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 choose add> sampler> HTTP request. enter your host name or IP address in the server name or IP address. In this example, I write localhost. Enter the port number according to the actual situation. Mine is 8080. Enter HTTP as the Protocol, the method is get. Enter the URL of your JSP page according to your environment. I wrote/test. JSP; other values are default.
Then add a report. right-click the thread group and choose add> listener> aggregate report. when we run this thread group, the minimum, maximum, and average response time of browsing the test page will be displayed. if you need to write the report content to a file, you can enter the file path and file name to be saved in the file name. Of course, this is optional.
Finally, click "run"> "start" to run the test plan. It may take some time to run the test. During the test, you can view the results in the aggregation report window.
You can not only generate aggregate reports, but also generate other reports, such as spline visualizer, which is similar to aggregation reports.
Jmeter functions are far from limited, and there are many more outstanding functions. Please study them on your own. in addition to jmeter, there are other performance testing products. For more information about these products, see:
Mercury LoadRunner: http://www.mercuryinteractive.com/products/loadrunner/
Web performance, Inc.: http://www.webperformanceinc.com/
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.