面向Web应用内存膨胀的测试脚本预测与增强技术研究
发布时间:2018-05-01 05:40
本文选题:Web应用 + 内存膨胀 ; 参考:《南京航空航天大学》2017年硕士论文
【摘要】:近年来,Web应用发展迅速,广泛地应用于社会各个领域,同时也带来了越来越多的问题,其中一个重要问题是内存膨胀(Memory Bloat)。内存膨胀是Web应用等连续工作型软件中的一种常见缺陷。其表现通常是随着系统不断运行,内存消耗越来越大,进而影响系统性能,甚至导致宕机。人们已对Web应用以及其它一些应用中的内存膨胀问题进行了较多研究,然而,一般的测试方法缺乏导向性,在执行测试用例的过程中,首先测试的可能是不容易揭示内存膨胀缺陷的测试用例。一个用于内存膨胀问题检测的测试用例通常需要运行较长时间,因此,如果先执行不易发现缺陷的测试用例,可能浪费较多时间等测试资源,降低了缺陷发现效率。为解决Java Web应用上内存膨胀问题测试效率不高的问题,本文提出了一种面向Java Web应用内存膨胀的测试脚本预测排序方法,预测测试脚本引发内存膨胀的风险(即揭示缺陷的可能性),然后对测试脚本进行优先级排序,以优化测试执行顺序。同时提出一种面向内存膨胀的测试脚本优化与增强方法,通过优化和增强功能测试脚本生成一个能够更明显暴露内存膨胀缺陷的性能测试脚本。具体工作包括:(1)提出一种面向Web应用内存膨胀的测试脚本预测排序方法。对Web应用进行执行跟踪,收集内存膨胀风险特征数据来构建特征矩阵,基于特征矩阵,使用机器学习方法训练内存膨胀预测模型。依据预测模型对新的待执行测试脚本进行内存膨胀风险预测和排序,高风险脚本优先执行,加快Web应用程序内存膨胀测试的整体流程,提高内存膨胀缺陷发现效率。(2)提出一个面向Web应用内存膨胀的脚本优化与增强方法。通过去除测试脚本中与Web应用服务器端执行无关的测试语句来优化脚本结构,加速脚本执行速度。通过为脚本自动添加循环或并发操作,构造能够更明显暴露内存膨胀缺陷的性能测试测试脚本。(3)最后,本文实现了一个Web应用内存膨胀测试工具来支持测试脚本预测排序和优化与增强方法,并通过在若干真实Java Web应用程序上进行测试,检验了所提出方法的有效性。
[Abstract]:In recent years, Web applications have developed rapidly and been widely used in various fields of society. At the same time, they have brought more and more problems, one of which is memory bloating. Memory expansion is a common defect in continuous working software such as Web applications. Its performance is usually as the system continues to run, more and more memory consumption, and then affect the performance of the system, or even lead to downtime. Many researches have been done on the problem of memory expansion in Web applications and other applications. However, the general test methods are lack of guidance, and in the process of executing test cases, The first test is likely to be a test case that does not easily reveal memory expansion defects. A test case for memory expansion problem detection usually needs to run for a long time. Therefore, if we execute the test case which is not easy to find defects, we may waste more time and other test resources, and reduce the efficiency of defect detection. In order to solve the problem that the test efficiency of memory expansion problem in Java Web application is not high, this paper presents a test script prediction sorting method for Java Web application. Predict the risk of memory bulging caused by test scripts (that is, reveal the possibility of defects), and then prioritize test scripts to optimize the test execution order. At the same time, a test script optimization and enhancement method for memory expansion is proposed. By optimizing and enhancing the function test script, a performance test script that can expose memory expansion defects more obviously is generated. The main work includes: 1) A test script prediction sorting method for Web application memory expansion is proposed. The Web application is tracked, and the feature matrix is constructed by collecting the feature data of the memory expansion risk. Based on the feature matrix, the machine learning method is used to train the memory expansion prediction model. According to the prediction model, the memory expansion risk is predicted and sorted for the new test scripts to be executed. The high risk scripts are executed first, thus speeding up the overall process of memory expansion testing in Web applications. A script optimization and enhancement method for Web applications is proposed. The structure of the script is optimized by removing the test statements which are independent of the execution of the Web application server in order to speed up the execution of the script. By automatically adding loop or concurrent operations to the script, construct a performance test test script. In this paper, a Web application memory expansion testing tool is implemented to support the test script prediction sorting, optimization and enhancement methods, and the validity of the proposed method is verified by testing on several real Java Web applications.
【学位授予单位】:南京航空航天大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP393.09
【参考文献】
相关期刊论文 前6条
1 董龙明;王戟;陈立前;董威;;基于局部堆内存抽象表示的堆操作程序内存泄露检测[J];计算机研究与发展;2012年09期
2 陆伟;朱怡安;张龙妹;马春燕;;一种解决内存泄漏问题的自愈机制[J];西北工业大学学报;2011年04期
3 汪小林;王振林;孙逸峰;刘毅;张彬彬;罗英伟;;利用虚拟化平台进行内存泄露探测[J];计算机学报;2010年03期
4 邓小鹏;邢春晓;蔡莲红;;Web应用测试技术进展[J];计算机研究与发展;2007年08期
5 赖利锋;刘强;;Web应用程序的一种功能自动化测试模型与实现[J];计算机工程;2006年17期
6 贾晓霞;吴际;金茂忠;李郭欢;;Java程序内存泄漏综述[J];计算机应用研究;2006年09期
,本文编号:1828005
本文链接:https://www.wllwen.com/guanlilunwen/ydhl/1828005.html