面向云测试的主机预测技术
2020-07-06李昌建刘坤晋文明钱巨
李昌建 刘坤 晋文明 钱巨



摘 要:云测试用于云上管理和执行测试任务。由于云上的计算资源能够较为方便的扩展,而负载测试通常需要大量计算资源,因此负载测试非常契合基于云的测试方法。为了保证负载测试能够按照测试计划成功发起,并且不会出现资源不足或闲置,需要在测试执行前确定云上虚拟主机数目,而现有的研究还缺少此类技术。为此,提出了一种面向脚本化负载测试的云主机预测技术,在负载测试开始前执行小规模的负载测试,收集计算资源与测试负载的基础数据,在此基础上使用机器学习方法进行数据训练并预测主机数量。结果表明:提出的主机预测方法能够较好地预测出负载测试所需主机数目。
关键词:云测试;负载测试;测试脚本;主机预测
中图分类号:TP311 文献标识码:A
文章编号:1003—6199(2020)02—0150—05
Abstract:Cloud testing refers to manage and perform testing activities on the cloud. Since computing resources in a cloud can be elastically allocated and load testing often needs large computing resources,it is very suitable for cloud-based methods. In cloud-based load testing,in order to ensure that the loads can be successfully launched according to a test plan without insufficient computing resources and avoid unnecessary wastes on such resources,it is necessary to determine the number of virtual hosts in the cloud used for creating test clients before the testing is performed. However,there lack such technique in the existing research. Therefore,this paper proposes a cloud host number prediction technique for scripted-based load testing. The new approach does small-scale load testing to gather basic data. Then,machine learning methods will be applied to train data and predict the required number of hosts. The results show that the proposed approach is effective for cloud-based load testing.
Key words:cloud testing;load testing;test script;host prediction
負载测试根据指定的性能要求和应用场景,模拟用户操作,对待测系统施加不同的测试负载,监控系统在不同负载情况下的性能指标数据(响应时间、吞吐率和资源利用等),从而评估系统的性能[1]。传统负载测试主要利用本地集群来发起测试,在此方面已经有一些相对成熟的负载测试工具,如Load Runner[2]、Apache Jmeter[3]等,极大方便了负载测试的展开。然而,传统负载测试需要相关技术人员来搭建测试环境、安装部署测试工具,测试过程繁琐。搭建测试环境所需的硬件服务器对中小型企业也是一笔不小的成本,而在测试结束后如无其他计算需求,易使得服务器处于闲置状态,浪费资源。……
