Loadrunner教程读后感-VuGen

时间:2022-06-05 14:23:43

一、loadrunner协议分析

协议确定方法

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

二、提交表单函数的区别

(1)web_sumit_form()

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

(2)web_sumit_data()

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

三、web_url和web_link

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

四、VuGen脚本回放与调试

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

五、VuGen录制参数设置

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

六、脚本增强

Loadrunner教程读后感-VuGen

(1)插入事务

Loadrunner教程读后感-VuGen

参考代码:

    lr_start_transaction("login");

    web_submit_data("login.php",
"Action=http://newtours.demoaut.com/login.php",
"Method=POST",
"RecContentType=text/html",
"Referer=http://newtours.demoaut.com/",
"Snapshot=t42.inf",
"Mode=HTTP",
ITEMDATA,
"Name=osCsid", "Value=9ed75e9153b9cb21ff85042cd93335d6", ENDITEM,
"Name=action", "Value=process", ENDITEM,
"Name=userName", "Value=wyl", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=login.x", "Value=22", ENDITEM,
"Name=login.y", "Value=3", ENDITEM,
LAST); lr_end_transaction("login",LR_AUTO);

(2)插入集合点

Loadrunner教程读后感-VuGen

相关代码:

    lr_rendezvous("login");

    lr_start_transaction("login");

    web_submit_data("login.php",
"Action=http://newtours.demoaut.com/login.php",
"Method=POST",
"RecContentType=text/html",
"Referer=http://newtours.demoaut.com/",
"Snapshot=t43.inf",
"Mode=HTTP",
ITEMDATA,
"Name=osCsid", "Value=b7f96e1104d6557ee10fb8268b8a7e6a", ENDITEM,
"Name=action", "Value=process", ENDITEM,
"Name=userName", "Value=wyl", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=login.x", "Value=28", ENDITEM,
"Name=login.y", "Value=13", ENDITEM,
LAST); web_submit_data("login.php_2",
"Action=http://newtours.demoaut.com/login.php",
"Method=POST",
"RecContentType=text/html",
"Referer=http://newtours.demoaut.com/",
"Snapshot=t44.inf",
"Mode=HTTP",
ITEMDATA,
"Name=osCsid", "Value=b7f96e1104d6557ee10fb8268b8a7e6a", ENDITEM,
"Name=action", "Value=process", ENDITEM,
"Name=userName", "Value=wyl", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=login.x", "Value=28", ENDITEM,
"Name=login.y", "Value=13", ENDITEM,
LAST); lr_end_transaction("login",LR_AUTO);

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

Loadrunner教程读后感-VuGen

(3)参数化

参数化之前需要确保脚本可以运行通过

Loadrunner教程读后感-VuGen

查看参数化变量的输出效果,需要勾选这个选项

Loadrunner教程读后感-VuGen

(4)关联

Loadrunner教程读后感-VuGen