【问题标题】:LoadRunner - Manual Correlation - Unable to get the value using web_reg_save_paramLoadRunner - 手动关联 - 无法使用 web_reg_save_param 获取值
【发布时间】:2016-08-16 02:16:23
【问题描述】:

我正在使用 LoadRunner 测试基于 Siebel CRM 的应用程序的性能。我面临的问题是我无法获得每个会话唯一的 SRN 号码。

我用来捕获 SRN 的代码如下

//HELLO YOUR CODE STARTS HERE.....FOR MANUAL CORRELATION
web_reg_save_param("Siebel_SRN",    
    "NOTFOUND=ERROR",                      
    "LB=SRN`",
    "RB=`", 
    "Ord=All", 
    "Search=All",   
    "IgnoreRedirections=Yes",
    "RelFrameId=All",       
    LAST);
lr_output_message( "Siebel_SRN value is %s", lr_eval_string( "{Siebel_SRN}" ) );
//HELLO YOUR CODE ENDS HERE.....FOR MANUAL CORRELATION

如果我按 SRN` 搜索,我可以看到 SRN 值。

以下是我从服务器得到的响应。我正确设置了边界(我相信如此)但无法获得 SRN 值。

vuser_init.c(161):     7/23048/scripts/HICalendarUI.htm`sui`false`vfn`_sweclient._swecontent._sweview`IsWebSocket
vuser_init.c(161):     BSReady`false`WebSocketServerPort``SweBusyTimer`30`lt`1471312453347`MR1`Y`cqt`-1`ui`L17LOA
vuser_init.c(161):     D`IsAutoOn`false`ect`Link`SRN`ABrcHGKVMlEGktXB3ekmRUEOy6rYzkMmy7OicIW0yHMb`ec`<span class=
vuser_init.c(161):     \\"siebui-icon-icon_select\\"><img src=\\"images/icon_select.gif\\" border=\\"0\\" align=\\
vuser_init.c(161):     "absmiddle\\" alt=\\"Pick Applet\\"  title=\\"Pick Applet\\" >\\<\\/span>`cks`1-14TA9_DHHS
vuser_init.c(161):     +L17_43%7c1470288710%7c1471223560_0_23048__L`vs`15.9.0.0 SIA [23048]  ENU`USC`1`IsMsgBarEna
vuser_init.c(161):     bled`true`lodc`0`IsMobileApplication`false`iri`<span class=\\"siebui-icon-icon_required\\"
vuser_init.c(161):     ><img src=\\"images/icon_req.gif\\" border=\\"0\\" space=\\"0\\" hspace=\\"0\\" alt=\\"Req

我在重播时收到以下消息

 No match found for the requested parameter "Siebel_SRN". Either the specified boundaries
 were not found in the response or the matched text is longer than current max html parameter size of 999999 bytes.
 The total length of the response is 15062 bytes. You can use 
"web_set_max_html_param_len" to increase the max parameter size.    [MsgId: MERR-26377] [Time:2016-08-16 11:54:27]

Siebel_SRN 的输出是

user_init.c(296): Registering web_reg_save_param was successful     [MsgId: MMSG-26390]
vuser_init.c(307): Warning: The string 'Siebel_SRN' with parameter delimiters is not a parameter.
vuser_init.c(307): Siebel_SRN value is {Siebel_SRN} [Time:2016-08-16 11:54:21]

我正在做一些愚蠢的事情。但无法弄清楚。请帮我解决这个问题。提前谢谢

【问题讨论】:

  • 您的管理层是否已派您参加有关此工具的培训或为您提供了导师?

标签: performance performance-testing correlation loadrunner


【解决方案1】:

首先,确保您将web_reg_save_param 放在目标请求步骤(web_urlweb_custom_requestweb_submit_form 等)之前,因为应始终事先注册相关性。

您也不应该传递Ord=All 参数:它会在Siebel_SRN_1Siebel_SRN_2 等参数上创建一个数组。在您的情况下,响应中只有一个 SRN 值实例。 IgnoreRedirections=Yes 看起来也很奇怪:一般情况下不需要忽略 HTTP 重定向。更多信息请查看the official documentation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-21
    • 1970-01-01
    • 1970-01-01
    • 2018-10-26
    • 1970-01-01
    • 2020-07-16
    • 1970-01-01
    相关资源
    最近更新 更多