用户名: 密码: 验证码:
Web性能测试模型研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
在市场需求的推动下,Web应用如今已经从一般的网站发展成为大型电子商务、信息发布和提供各种服务的平台,软件规模不断扩大,软件复杂性不断增加,但是激烈的商业竞争使软件开发周期缩短,如何保证Web应用的正确性和可靠性越来越成为人们关注的问题。作为保证软件质量和可靠性的重要手段,Web应用软件的测试就成为如今开发过程中的一个重要环节。对Web应用系统的测试包括系统功能测试、性能测试、安全性测试等。其中,性能测试尤为重要,因为性能直接反映了Web所提供服务的质量水平,同时由于Web具有动态特性,它的用户数目和数据传输速率都在不断变化,所以性能问题成为困扰Web应用发展的最大问题。
     目前,国内外研究机构已经对Web应用软件的性能测试进行了大量研究,提出了一些性能测试方法,并开发了许多测试工具。比较成熟的性能测试方法主要有:虚拟用户方法,WUS方法和对象驱动方法。这些方法各有侧重点,虚拟用户方法通过模拟真实用户的行为来对被测程序施加压力,WUS方法意在建立真实的测试场景,对象驱动方法强调测试Web的组成对象。针对Web性能测试的测试策略选择与优化研究较少,而正确选择测试策略对提高性能测试效率具有重要意义。
     本文在分析现有性能测试模型基础上,结合软件控制论思想,提出一种反馈控制Web性能测试模型,目的在于寻找最优的性能测试策略,以消耗最小代价,达到性能测试的目标。反馈控制Web性能测试模型使用受控马尔可夫链描述,将测试过程分解为不同的状态,测试策略驱动测试过程从一种状态向另一种状态的转变,不同的测试策略将产生不同的状态,选择最优的测试策略,使测试过程迅速向目标状态收敛,完成测试。本文围绕反馈控制Web性能测试模型展开研究,主要研究工作涉及以下几部分:
     (1)反馈控制原理在性能测试中的应用。在分析现有性能测试方法特点的基础上,结合反馈控制原理,研究了如何将测试反馈信息与测试策略相结合的问题。
     (2)反馈控制Web性能测试模型的建立。研究如何使用受控马尔可夫链描述模型,对模型抽象;考虑如何设计最优测试策略既避免决策时计算量过大,又利用Web性能测试特点。
     (3)模型仿真。分析开源性能测试工具JMeter和Web服务软件Apache,结合反馈控制Web性能测试模型思想,对JMeter和Apache进行适当修改、添加模块,仿真模型。
     本文追踪了性能测试方法国内外最新研究成果和性能测试工具的发展,在此基础上结合软件控制论思想,提出反馈控制Web性能测试模型,主要包括以下研究成果:
     (1)使用受控马尔可夫链描述Web性能测试模型。马尔可夫链是指数学中具有马尔可夫性质的离散时间随机过程,研究中将Web测试过程分解为不同的状态,对系统状态和测试策略抽象,完成使用受控马尔可夫链描述Web性能测试模型。
     (2)为反馈控制Web性能测试模型的核心——控制器建模。控制器负责测试策略的选择,文章分析了决定测试策略优劣的关键因素,结合Web性能测试中性能指标与测试策略之间的关系,建立了测试策略最优化选择模型。
     最后,利用作者开发的模型仿真程序,对Web服务器进行压力测试,测试结果表明:使用反馈控制Web性能测试模型能够较快的定位系统最大负载,确定系统瓶颈位置,显著提高性能测试效率。
Driving by market demand, Web application has nowadays been developed into a large-scale platform for e-commerce, information release and service supply from general website. The software size is expanding and software complexity increasing. However, software development cycle is shortened by fierce business competition. How to guarantee accuracy and reliability becomes a focused question. As an important way of guaranteeing the quality and reliable of software, the testing of Web applications becomes an important field in software developing. The testing of Web application system includes function test, performance test, security test, etc. Performance test is especially important for performance reflects directly the service quality supplied by Web. Meanwhile, the number of Web users and its date transmission rate are always changing, that this dynamic character becomes the main problem in the developing of Web applications.
     Recently, research institutes in and abroad have done lots of researches on performance test of Web application software, presented some performance approaches and developed many testing tools. Among the performance test approaches, relevantly mature ones are virtual user method, WUS method and object-driving method with each one has its own emphasis point. Virtual user method exerts pressure on testing program by imitating behaviors of real users; WUS method aims at establishing real test scenarios; object-driving method emphasizes on testing the making-up objects of Web. There is no research on choice and optimization of test strategies of Web performance test, however, choosing test strategy correctly is significant for promoting performance test efficiency.
     In this article, based on the analysis of existing performance test models and combines software cybernetics, we has presented a feedback control model of Web performance test with the purpose of finding out an optimal performance test strategy to achieve the performance test goal with minimized cost. Feedback control model of Web performance test apply controlled Markov chain to describe. It decomposes the test process into different states. Test strategy drives test process to transfer from one state to another. Different test strategy will generate different states. Choose the best strategy to make test process converge to target state quickly then finish test. This article focuses on the performance test models and shall reach the works as follows:
     (1) The application of feedback control principle in performance test. Based on the analysis of characteristics of existing performance test approaches and combines the principle of feedback control principle, this article demonstrates how to combine feedback test information with test strategy.
     (2) The establishment of feedback control model of Web performance test. This article demonstrates how to describe model and abstracted it with controlled Markov chain; considers designing an optimal test strategy to avoid computational complexity, meanwhile to take the advantage of characteristics of Web performance test.
     (3) Software phantom. This article analyzes open source test tool JMeter and Web service software Apache, combines feedback control model of Web performance test idea then simulates model by does appropriate revisions and add modules to JMeter and Apache.
     This article has traced the updated research results of performance test approaches and development of test tools in and abroad, and then combines the idea of software cybernetics to develop the feedback control model of Web performance test. The main research results include:
     (1) Use controlled Markov chain to describe the Web performance test models. Markov chain is the discrete time stochastic process in mathematics that owns the property of Markov. During the research, Web test process is decomposed into different states, system states and test strategies are abstracted to achieve the purpose of using controlled Markov chain to describe Web performance test models.
     (2) Core of feedback control model of Web performance-controller modeling. Controller is responsible for the choice of test strategy. The article analyzes the key factors that determine the quality of test strategy, combines the relationship of performance index and test strategy, establishes an optional model of optimal test strategy.
     Finally, we use the model simulation program developed to do pressure test on a Web server. The result proves that the feedback control model of Web performance can locate the peak load of the system and find out the bottleneck position quickly. It can improve the efficiency of performance test significantly.
引文
[1]路晓丽,葛玮.Web应用软件的测试与分析[J].计算机科学,Vol.31,2004.
    [2]LoadRunner User's Guide.Sunnyvale[M/CD].CA:Mercury Interactive Corporation,2000.
    [3]Mercury Interactive Corp.Load testing to predict Web pefforrnance[EB/OL].2000.http://www-svca.mercuryinteractive.oom/pdf/products/whitepapers/Ioad-testing-web-perform.pdf.
    [4]A Savoia.The science of Website load testing[EB/OL].http://www.keynote.com/downloads/whitepapers/science-of-loadtesting.pdf,2004-01.
    [5]B M Subraya,S V Subrahmanya.Object driven performance testing in Web applications[J].Proc of the 1st Asia-Pacific Confon Quality Software,Los Alamotos,California:IEEE Computer Society Press,2000:17-26.
    [6]顾玉良,王立福.B/S软件测试技术及工具实现[J].计算机工程与应用,2000:70-83.
    [7]范国闯,钟华,黄涛等.Web应用服务器研究综述[J].软件学报.2003,Vol.14 No.10:1728-1739
    [8]C.Wilkinson.Stress testing Web services[EB/OL].http://www-900.ibm.com/develo-perWorks/cn/Webservices/ws-tip-strstest/index_eng.shtm.
    [9]尹高嵩,范辉.Web负载测试的研究与应用[J].微机发展.2004,Vol.14 No.10:96-94,103.
    [10]马琳,罗铁坚,宋进亮等.Web应用性能测试及优化[J].计算机应用.2004-12,vol.24:26-29.
    [11]What is OpenSTA?[EB/OL].http://www.opensta.org/.2005-01-09.
    [12]秦志敏,安永新,陈泳章.Web应用的风险测试研究[J].计算机工程与应用.2003,Vol.39,No.25:157-159.
    [13]刘亮.基于HTTP/S协议的Web性能测试工具的设计与实现[D].呼和浩特:内蒙古大学,2005-05.
    [14]刘智勇.Web应用程序测试技术研究及自动化测试工具的实现[D].长沙:湖南大学,2005-05.
    [15]蔡开元,李永超,景涛等.软件测试的控制论方法[J].航空学报.2002,Vol.23,No.5:448-454.
    [16]Kai-Yuan Cai,Bo Gu,Hai Hu,Yong-Chao Li.Adaptive software testing with fixed-memory feedback[J].The Journal of Systems and Software.80(2007)1328-1348.
    [17]宫云战.软件测试[M].北京:国防工业出版社.2006年1月第1版.
    [18]Grenford J.Myers.The Art of Software Testing(Second Edition)[M].机械工业出版社.2006.
    [19]刘翠娟.Web应用中静态测试的研究[D].西安:西北大学,2004年6月.
    [20]Ron Patton.Software Testing(2nd Edition)[M].机械工业出版社 2006年04月.
    [21]Nguyen H.Q,冯学民等译.Web应用测试[M].北京:电子工业出版社,2003.
    [22]中国软件评测中心.性能测试:软件测试的重中之重[EB/OL].2005.http://www.cstc.org.cn/.
    [23]方明.开放的Web负载产生器模型研究与实现[D].北京:国防科技大学,2002.
    [24]林闯.计算机网络和计算机系统的性能评价[M].北京:清华大学出版社,2001.
    [25]张大陆,黄伟力.基于Web应用系统的评测方法和技术[J].计算机工程,2003,Vol.29No.4:90-92,139.
    [26]姜昌华,朱敏,陈优广.Web应用程序压力测试[J].计算机应用,2003,Vol.13 No.10:75-77.
    [27]迟瑞峥,钟亦平,张世永.基于协议分析的自动化Web性能测试[J].计算机工程,2005-4,Vol.31 No.7:103-104,117.
    [28]梁晟,李明树,梁金能等.一种模拟驱动的Web应用程序性能测试方法[J].计算机研究与发展.2003,40(7):1069-1075.
    [29]连国钧.动力控制工程[M].西安:西安交通大学出版社 2001年06月.
    [30]李杰,屈玉贵,张英堂.一种自适应的Web压力测试模型[J].计算机工程与应用.2006.02:90-92
    [31]Cai K Y.On the Concepts of Total Systems,Total Dependability and Software Cybernetics[Z].(unpublished manuscript),Centre for Software Reliability.City University,London.Draft version,October 1994;revised version,July 1995.
    [32]Cai K Y,Chen T Y,Tse T H.Towards Research on Softwvare Cybernetics[J].Proc 7th IEEE International Symposium on High Assurance Systems Engineering,2002,240-241.
    [33]Cai K Y.Optimal Software Testing and Adaptive Software Testing in the Context of Software Cybernetics[J].Information and Software Technology,2002,44:841-855.
    [34]Cai K Y,Cangussu J W,DeCarlo R A,Mathur A P.An Overview of software Cybernetics[J].Proc STEP 2003,IEEE Computer Society Press,2004.
    [35]蔡开元.关于软件可靠性和软件控制论的若干认识[J].中国科学基金,2004.No.4.201-204.
    [36]Cai K Y.A controlled Markov chains approach to software testing[J],submitted for publication,2000.
    [37]陈宗基.自适应技术的理论及应用[M].北京:北京航空航天大学出版社.1991.
    [38]李克文,苏波.基于Web应用的快速压力测试模型[J].微计算机应用.2007-09.Vol.28:991-994.
    [39]Apache HTTP Server Version 2.2 Documentation[EB/OL].http://httpd.apache.org/docs/2.2/.
    [40]Kevin Braithwaite.使用Microsoft性能数据助手进行自定义分析[EB/OL].http://www.ibm.com/developerworks/cn/Websphere/techjournal/0310_braithwaite/braithwaite.html 2003-12-01.
    [41]Apache JMeter Overview[EB/OL].http://jakarta.apache.org/jmeter/index.html.
    [42]Badbay帮助文件[CP/OL].http://www.badboy.com.au/.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700