|
希望大家帮忙!
用loadrunner进行sapgui协议的性能测试,主要针对上传、下载,网上这块基本都是针对web方式的,看了很多sap的函数,还是没有找到门道。
脚本录出来了,和web方式的形式差不多,不知道如何完善下载过程,非常急!!!
lr_start_transaction("apt06-03-输入z083");
sapgui_set_ok_code("z083",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1013",
END_OPTIONAL);
sapgui_press_button("回车",
btn1,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1014",
END_OPTIONAL);
lr_end_transaction("apt06-03-输入z083",LR_AUTO);
lr_think_time(3);
lr_start_transaction("apt06-04-显示下载报表数据");
sapgui_set_text("S_VKORG1-LOW",
"1001",
ctxtS_VKORG11,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1017",
END_OPTIONAL);
sapgui_set_text("S_VTWEG1-LOW",
"10",
ctxtS_VTWEG11,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1018",
END_OPTIONAL);
sapgui_set_text("S_SPART1-LOW",
"10",
ctxtS_SPART11,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1019",
END_OPTIONAL);
sapgui_set_focus(ctxtS_SPART11,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1020",
END_OPTIONAL);
sapgui_press_button("回车",
btn1,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1022",
END_OPTIONAL);
sapgui_press_button("执行 (F8)",
btn2,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1025",
END_OPTIONAL);
lr_end_transaction("apt06-04-显示下载报表数据",LR_AUTO);
lr_think_time(3);
lr_start_transaction("apt06-05-下载数据");
sapgui_press_button("下载数据",
btn3,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1028",
END_OPTIONAL);
lr_end_transaction("apt06-05-下载数据",LR_AUTO);
lr_think_time(3);
lr_start_transaction("apt06-06-保存");
sapgui_status_bar_get_text("paramStatusBarText",
BEGIN_OPTIONAL,
"Recorded status bar text: 9,989 个字节已传输",
"AdditionalInfo=sapgui1031",
END_OPTIONAL);
lr_end_transaction("apt06-06-保存",LR_AUTO); |
|