首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >LoadRunner ajax字段

LoadRunner ajax字段
EN

Stack Overflow用户
提问于 2012-11-22 21:52:04
回答 3查看 1.4K关注 0票数 0

我在一个网页上记录了一个脚本,其中包含一个我通常输入的文本框,邮政编码和另一个字段是根据我输入的邮政编码更新的。当重放svript时,我会出错。我认为我的问题与正在生成的脚本包含一个web_submit_data有关,因为我输入的每个数字都是邮政编码的一部分。

下面是在第一个web_submit_data之后获得的错误消息:

错误-26612: HTTP状态-代码=500(内部服务器错误)用于“和一些url”MsgId: MER-26612]

有人知道这个问题和可能的解决办法吗?在此说明如下:

http://www.myloadtest.com/scripting-exercise-a-basic-ajax-application/

谢谢!

我的密码在下面。它是使用web/http协议的记录器,当我键入一个自填充字段/自动完成字段时,它会记录下来,所以当我在zipcode字段中键入7000时,LR会为我输入的每个nubmer生成一个web_submit_data。我不知道这是不是问题所在。

行动(){

代码语言:javascript
复制
web_url("nav_security_check", 
    "URL=http://someurl.local:8080/brukerprofil/nav_security_check?id=12345678910", 
    "Resource=0", 
    "RecContentType=text/html", 
    "Referer=", 
    "Snapshot=t1.inf", 
    "Mode=HTML", 
    EXTRARES, 
    "Url=img/nav_logo.gif", "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", ENDITEM, 
    LAST);

lr_think_time(4);

web_submit_data("brukerprofil", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.0-brukerprofil~skjema-valgtAdresseType", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t2.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType", "Value=radio11", ENDITEM, 
    LAST);

lr_think_time(4);

web_submit_data("brukerprofil_2", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t3.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=7", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_3", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t4.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=70", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_4", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t5.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=700", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_5", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t6.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=7000", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_6", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t7.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=7000", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_7", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.2-brukerprofil~skjema-valgtAdresseType-alternativAdressePanel-norskAlternativPostnummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t8.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=7000", ENDITEM, 
    LAST);

lr_think_time(6);

web_submit_data("brukerprofil_8", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IBehaviorListener.1-brukerprofil~skjema-kontonummer", 
    "Method=POST", 
    "RecContentType=text/xml", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t9.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=kontonummer", "Value=62281154546", ENDITEM, 
    LAST);

web_submit_data("brukerprofil_9", 
    "Action=http://someurl.local:8080/brukerprofil/brukerprofil?0-1.IFormSubmitListener-brukerprofil~skjema", 
    "Method=POST", 
    "RecContentType=text/html", 
    "Referer=http://someurl.local:8080/brukerprofil/brukerprofil?0", 
    "Snapshot=t10.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=brukerprofil-skjema_hf_0", "Value=", ENDITEM, 
    "Name=valgtAdresseType", "Value=radio11", ENDITEM, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostAdresse1", "Value=Nedgata 2", ENDITEM, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostAdresse2", "Value=Postboks 2", ENDITEM, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostAdresse3", "Value=Sentrum 123", ENDITEM, 
    "Name=valgtAdresseType:alternativAdressePanel:norskAlternativPostnummer", "Value=7000", ENDITEM, 
    "Name=kontonummer", "Value=62281154546", ENDITEM, 
    "Name=mobilpanel:landkode", "Value=47", ENDITEM, 
    "Name=mobilpanel:nummer", "Value=98765432", ENDITEM, 
    "Name=telefonnummerpanel:landkode", "Value=47", ENDITEM, 
    "Name=telefonnummerpanel:nummer", "Value=22225555", ENDITEM, 
    "Name=ekstra-telefonnummerpanel:landkode", "Value=46", ENDITEM, 
    "Name=ekstra-telefonnummerpanel:nummer", "Value=11223344", ENDITEM, 
    "Name=epost", "Value=per.hansen@hjemme.no", ENDITEM, 
    LAST);

return 0;

}

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-11-23 14:46:47

我打赌你有未处理的动态数据。这与您的另一个帖子非常相关。查看您已经注意到的请求,有几个项可能是动态数据的未处理元素和一个似乎完全伪造的安全ID。

记录你的工作过程2-3次。使用WinDiff (包括在LoadRunner中)或其他您喜欢的文件差异工具来识别记录之间的差异。动态元素应该从页面上跳下来,作为记录之间的区别。如果希望脚本继续,则需要适当地处理这些动态元素。

此外,测试101个内务管理项目,每一步都有一个预期的结果。代码中明显缺失的是任何类型的检查,以获得正确的预期结果。在这种情况下,很容易返回HTTP 200状态页,它完全脱离了业务流程的上下文,但允许脚本继续。在这种情况下,您已经“脱离轨道”,并且不知道是否由于缺少对预期结果的检查,所以100%肯定您将在1-2请求集内命中HTTP 500。

票数 1
EN

Stack Overflow用户

发布于 2012-11-22 21:59:03

当服务器出现内部错误(如PHP脚本出错)时,会生成HTTP错误500。我可以提供帮助,如果您只需要发布生成ajax请求的代码以及它正在获取的文件(只是内容很好)。

票数 0
EN

Stack Overflow用户

发布于 2012-11-23 03:55:09

Magnus,我建议您停止使用record按钮,查看HTTP级别上正在发生的事情,而不是依赖工具来获取请求。

我建议您花一些时间在火虫HTTP监视费德勒上,看看应用程序首先要做什么。

如果您不知道手动执行时会发生什么,则无法自动执行某些操作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13520456

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档