LoadRunner Error -26377: No match found for the requested parameter 获取参数的方法要前置

   
	
	web_reg_save_param(
	    "access_token",
	    "LB=access_token\":\"",       //获取返回参数左右边界值时:有"双引号时,需要使用\来进行转义
	    "RB=\",",
	    "Search=Body",
	    LAST);
 
	web_reg_save_param(
	    "token_type",
	    "LB=token_type\":\"",
	    "RB=\",",
	    "Search=Body",
	    LAST);	
	
	/* ↑↑↑ 取参数的方法要放在请求前边 ↑↑↑ */
	
	
	web_custom_request("token", 
		"URL=https://127.0.0.1/token", 
		"Method=POST", 
		"Resource=0", 
		"RecContentType=application/json", 
		"Referer=https://127.0.0.1/login", 
		"Snapshot=t77.inf", 
		"Mode=HTTP", 
		"Body=grant_type=client_credentials&client_Id=clientid&client_Secret=clientsecret", 
		LAST);

	
	web_add_auto_header("Authorization","{token_type} {access_token}");

你可能感兴趣的:(压力测试,LoadRunner)