Loadrunner简单GET请求
在需要插入脚本的地方,1.点击鼠标左键 2.点击insert 3.insert step
选择custom request,点击Ok
填好方法GET,填好URL,填好encoding type,点击确定
生成代码:
Action()
{
web_custom_request("web_custom_request",
"URL=https://pubteXXXX.com", //保密原因XXX代替
"Method=GET",
"TargetFrame=",
"Resource=0",
"Referer=",
"EncType=application/json",
"Body=",
LAST);
}
点击运行,结果(成功):
Virtual User Script started at : 2019-04-30 19:28:30
Starting action vuser_init.
Web Turbo Replay of LoadRunner 11.0.0 for WIN32; build 8859 (Aug 18 2010 20:14:31) [MsgId: MMSG-27143]
Run Mode: HTML [MsgId: MMSG-26000]
Run-Time Settings file: "C:\Users\Administrator\Documents\test\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(7): Found resource "https://www.googletagmanager.com/gtag/js?id=AW-768708825" in HTML "https://puxxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pxxx.com/static/lib/vue.runtime.min.js" in HTML "https://pubtexxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://puxxx.com/static/lib/vue-i18n.min.js" in HTML "https://puxxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pxxx.com/static/lib/vuex.min.js" in HTML "https://pubxxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://puxxxcom/static/lib/vue-router.min.js" in HTML "https://pxxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://apis.google.com/js/api:client.js" in HTML "https://pubxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pubxxxy.com/js/chunk-vendors.0194f8de.js" in HTML "https://pubtexxxy.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pubxxxxy.com/js/app.76ea026f.js" in HTML "https://xxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pubtexxxx.com/js/chunk-vendors-legacy.ff0651b9.js" in HTML "https://puxxx.com" [MsgId: MMSG-26659]
Action.c(7): Found resource "https://pubtxxxx.com/js/app-legacy.93cf913e.js" in HTML "https://puxxx.com" [MsgId: MMSG-26659]
Action.c(7): web_custom_request("web_custom_request") was successful, 889499 body bytes, 4831 header bytes [MsgId: MMSG-26386]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
...