软件测试论坛

 找回密码
 软件测试论坛注册页
查看: 2065|回复: 4

[LR脚本示例] 详解loadrunner的think time

[复制链接]
发表于 2007-4-5 16:13:15 | 显示全部楼层 |阅读模式
软件测试工程师就业班马上开班
lr_start_sub_transaction

标记子事务的开始
lr_start_transaction

记事务的开始
lr_end_sub_transaction

标记子事务的结束以便进行性能分析
lr_end_transaction

标记 LoadRunner 事务的结束
思考时间大于阈值时生成: 使用思考时间的阈值。如果录制思考时间小于该阈值,VuGen 将不会生成思考时间语句。您也可以指定阈值。默认值为 3 - 如果思考时间少于 3 秒,VuGen 将不会生成思考时间语句。如果禁用此选项,VuGen 将不会生成任何思考时间。(默认情况下启用)
脚本

lr_start_sub_transaction("think time1","t1");

lr_think_time(10);

lr_end_sub_transaction("think time1",LR_PASS);

lr_start_sub_transaction("think time2","t1");

lr_think_time(10);

lr_end_sub_transaction("think time2",LR_PASS);

lr_end_transaction("t1", LR_AUTO);

输出:

Action.c(8): Notify: Transaction "t1" started.
Action.c(9): Notify: Transaction "think time1" started.
Action.c(10): lr_think_time: 10.00 seconds.
Action.c(11): Notify: Transaction "think time1" ended with "Pass" status (Duration: 9.9939 Think Time: 9.9892).
Action.c(12): Notify: Transaction "think time2" started.
Action.c(13): lr_think_time: 10.00 seconds.
Action.c(14): Notify: Transaction "think time2" ended with "Pass" status (Duration: 9.9954 Think Time: 9.9906).
Action.c(15): Notify: Transaction "t1" ended with "Pass" status (Duration: 19.9994 Think Time: 19.9798).
ISTQB
发表于 2007-4-5 17:06:56 | 显示全部楼层
软件测试工程师就业班马上开班
建议你写上原文的出处!
ISTQB
发表于 2007-4-6 14:57:15 | 显示全部楼层
发表于 2009-7-31 10:48:16 | 显示全部楼层
软件测试工程师就业班马上开班

本版积分规则

Archiver|手机版|小黑屋|领测软件测试网 ( 京ICP备10010545号-5 )

GMT+8, 2020-2-25 19:59 , Processed in 0.233442 second(s), 11 queries , Xcache On.

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表