APP下载

基于LoadRunner的Web系统性能测试与优化

2017-09-29陈英孙忠林

软件导刊 2017年9期
关键词:软件测试

陈英+孙忠林

摘 要:为了在软件产品发布之前确保软件质量,软件测试的重要性越来越受到人们重视。以专项能力管理系统为基础,阐述了软件测试的方法和过程以及测试脚本开发过程中事务和集合点的插入。按照统一标准测试Web对各种请求的响应时间,并结合LoadRunner性能测试工具对性能测试的两个重要指标,即响应时间和并发用户数进行研究,给出可靠的性能评价。使用LoadRunner进行测试分析可快速找到系统瓶颈,并通过结果分析采取相应的优化方案,在保证并发用户数不变的前提下再次进行测试。在虚拟用户数量相同的情况下,优化前比优化后的响应时间减少了10%,系统性能得以提升。

关键词:LoadRunner;软件测试;软件优化

DOI:10.11907/rjdk.172322

中图分类号:TP306 文献标识码:A 文章编号:1672-7800(2017)009-0026-02

Abstract:The importance of software testing has been paid more and more attention to in order to ensure the quality of the software products before the release of the software, to ensure that the software products meet the performance needs. On the basis of special ability management system, the method and process of software testing and the insertion of transaction and rendezvous during the development of test script are expounded. This paper tests the Web response time of various requests with the unified standard and combined with LoadRunner performance testing tool response time and the number of concurrent users of two important indicators of performance test are studied. The performance evaluation is given reliable. By using the method of LoadRunner test and analysis, the system bottleneck can be found quickly, and the corresponding optimization scheme is adopted through the result analysis. On the premise that the number of users remains unchanged to test again. The response time after optimization is reduced by 10%, so the performance of the system is improved.

Key Words:LoadRunner; software test;software optimization

0 引言

随着网络信息技术的快速发展,信息技术已广泛渗透到教育管理的整个过程,为人们的活动提供了诸多便利。为了在软件产品发布之前确保软件质量,软件测试应运而生[1-2]。通过软件测试可以提前发现产品缺陷,并将缺陷风险降到最低。本文重点通过使用LoadRunner对专项能力管理系统进行测试,研究并分析软件测试的方法、过程并提出优化方案[3-4],可为实现教学管理智能化和信息化提供有力的技术支撑,同时也可促进信息技术在教育领域的应用。

1 软件测试方法

(1)白盒测试。白盒测试可以看作一个透明盒子,不仅仅只是考虑外部形态,更多的是考虑盒子内部的逻辑结构。白盒测试又称为结构测试,有动态测试和静态测试之分[5]。动态测试主要是性能和内存,以及功能和接口之间的测试,静态测试主要是对程序和结构的评估[6]。

(2)黑盒测试。黑盒测试不用关心黑盒子里的结构,仅根据已知软件规格设计说明的前提下进行测试。主要测试每个功能是否满足客户需求,因此黑盒测试又称为功能测试。主要测试方法有等价类划分和随机数法[7-8]。

2 LoadRunner测试过程

2.1 测试计划

测试之前首先要明确测试的方法路径、工具和需测试的功能。本文使用loadrunner11.0作為性能测试工具,选择专项能力管理系统中的学员登录系统功能作为测试用例。

2.2 测试环境

专项能力管理系统被测的程序使用的测试环境为:操作系统Windows10,数据库MySQL与应用服务器tomcat7.0。

2.3 测试脚本

首先进行Create/Edit Scripts测试脚本的录制,使用http协议进行录制,录制的URL为http://localhost:9580/zxnlglxt/login.jsp,录制窗口和录制过程如图1、图2所示。

录制代码如下:

vuser_init()

{

web_url("login.jsp ",

"URL=http://localhost:9580/zxnlglxt/login.jsp/",endprint

猜你喜欢

软件测试
基于OBE的软件测试课程教学改革探索
基于MBD模型自动生成测试用例的软件测试方法
计算机软件测试方法的研究
EXCEL和VBA实现软件测试记录管理
关于软件测试技术应用与发展趋势研究
一种航空机载软件测试项目的进度改进模型
军用软件测试文档生成设计与实现
软件测试工程化模型及应用研究
智能电能表软件测试技术概述
《软件测试》课程教学策略研究