Loadrunner简单GET请求

本文介绍了如何在LoadRunner中插入并配置一个简单的GET请求。通过点击鼠标,选择'insert step',然后选择'custom request',填写GET方法、URL和编码类型,即可生成请求代码。执行后,请求成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在需要插入脚本的地方,1.点击鼠标左键 2.点击insert 3.insert step
image.png

选择custom request,点击Ok
image.png

填好方法GET,填好URL,填好encoding type,点击确定
image.png

生成代码:

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.
...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值