开源 性能测试工具
随着Web 2.0技术在B/S结构软件中的广泛应用,许多公司和政府机构都对外提供了一些基于Web的互联网服务软件。但是,通常在设计和开发这类Web应用软件的时候很难模拟出大量网络用户同时访问此系统的实际情况,因此,当web应用软件遭遇到网络用户并发访问时,容易发生应用服务器和数据库服务器的响应时间变慢,甚至有可能出现服务器宕机。为了避免这种情况的发生,在系统上线运行前,需要一种能够真实模拟大量用户访问Web系统的性能测试工具进行压力测试,测试动态网页(包括ASP、PHP、JSP等)的响应时间,为服务器的性能优化和调整提供数据依据。
使用开源软件最明显的优势是成本。各种Linux发行版比如Ubuntu不仅免费下载,而且易于安装、使用和更新,也不存在许可证的问题。成本虽然是最大的优势,但是质量也是重要的因素,开源软件质量可靠、弹性大、适应性也更强。例如电信和金融部门大规模采用Linux和其它开源解决方案是由于它们的性价比远远超过了Unix和Windows。
在性能测试领域除了常见的LoadRunner、silk-performance外还有众多的开源工具,笔者在此为大家介绍几款。
Apache JMeter
Description:
Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.
Requirement:
Solaris, Linux, Windows (98, NT, 2000). JDK1.4 (or higher).
Apache JMeter是一个专门为运行和服务器装载测试而设计的、100%的纯Java桌面运行程序。原先它是为Web/HTTP测试而设计的,但是它已经扩展以 支持各种各样的测试模块。它和用于HTTP和SQL数据库(使用JDBC)的模块一起运送。它可以用来测试静止资料库或者活动资料库中的服务器的运行情 况,可以用来模拟对服务器或者网络系统加以重负荷以测试它的抵抗力,或者用来分析不同负荷类型下的所有运行情况。它也提供了一个可替换的界面用来定制数据 显示,测试同步及测试的创建和执行。
Grinder
Description:
The Grinder is a Java load-testing framework making it easy to orchestrate the activities of a test script in many processes across many machines, using a graphical console application. Requirement: