2016-08-16 105 views
0

我正在使用LoadRunner来测试基于Siebel CRM的应用程序的应用程序的性能。我面临的问题是我无法获得每个会话都独有的SRN号码。LoadRunner - 手动关联 - 无法使用web_reg_save_param获取值

我使用捕捉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] 

我在做一些愚蠢的。但无法弄清楚。请帮我解决这个问题。先谢谢了

+0

您的管理层是否向您发送了关于此工具的培训或为您提供了导师? –

回答

1

首先,确保你的相关性应该总是预先注册的目标请求步骤(web_urlweb_custom_requestweb_submit_form等)之前放置在web_reg_save_param

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