1. 录制

Runtime Settings
proxy
Internet protocol
download filters

record
general→recording→html-based script→a script containing explicit urls only
http properties→advanced→support charset→utf8

  1. 回放

initialize all vusers simultaneously 同时初始化所有vuser 快
initialize each vuser just before it runs 运行时初始化各个vuser 慢

Download non-HTML resources 去掉图片下载

winlnet replay instead of sockets 解决超时

  1. 结果分析

Running Vusers
Displays the number of Vusers that executed Vuser scripts, and their status, during each second of a load test. This graph is useful for determining the Vuser load on your server at any given moment.
并发用户数
显示在负载测试的每一秒期间执行Vuser脚本的Vuser数及其状态。 此图对于在任何给定时刻确定服务器上的Vuser负载非常有用。

Hits per Second
Displays the number of hits made on the Web server by Vusers during each second of the load test. This graph helps you evaluate the amount of load Vusers generate, in terms of the number of hits.
每秒点击数
显示Vuser在每次负载测试期间在Web服务器上执行的命中数。 此图表可帮助您根据命中数评估Vuser生成的负载量。

Throughput
Displays the amount of throughput (in bytes) on the Web server during the load test. Throughput represents the amount of data that the Vusers received from the server at any given second. This graph helps you to evaluate the amount of load Vusers generate, in terms of server throughput.
吞吐量
显示负载测试期间Web服务器上的吞吐量(以字节为单位)。 吞吐量表示Vuser在任何给定秒钟从服务器接收的数据量。 此图可帮助您根据服务器吞吐量评估Vuser生成的负载量。

Transaction Summary
Displays the number of transactions that passed, failed, stopped, or ended with errors.
事务总数
显示通过,失败,停止或以错误结束的事务数。

Average Transaction Response Time
Displays the average time taken to perform transactions during each second of the load test. This graph helps you determine whether the performance of the server is within acceptable minimum and maximum transaction performance time ranges defined for your system.
平均事务响应时间
显示在负载测试的每一秒期间执行事务所花费的平均时间。 此图可帮助您确定服务器的性能是否在为系统定义的可接受的最小和最大事务性能时间范围内。

Transactions per Second
Displays the number of completed transactions (both successful and unsuccessful) performed during each second of a load test. This graph helps you determine the actual transaction load on your system at any given moment.
每秒事务数
显示在负载测试的每一秒期间执行的已完成事务(包括成功和不成功)的数量。 此图可帮助您确定系统在任何给定时刻的实际事务负载。

  1. 关联分析

overlay tile correlate
覆盖 平铺 关联

并发用户数、平均事务响应时间关联分析

并发用户数、吞吐量关联分析

每秒点击数、并发用户数合并分析

每秒点击数、吞吐量合并分析

Action()
{

web_reg_save_param("test",        //关联函数
"LB=,",
"RB=,",
"Ord=1",
"Search=NoResource",
LAST);

web_custom_request("login",
"URL=http://api.wuye.wisq.cn/login?",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=",
"Mode=HTTP",
"EncType={contype};charset=UTF-8",
"Body={\"phone\":\"17152716641\",\"password\":\"123123\"}",
LAST);

lr_output_message(lr_eval_string("{test}"));
if(strcmp(lr_eval_string("{test}"),"msg")==0)
lr_output_message("断言成功");
else
lr_output_message("断言失败");


return 0;

}

标签: none

评论已关闭