简体   繁体   English

JMeter 录音中的脚本提示错误信息

[英]Script alert error message in JMeter recording

I have recorded the JMeter script from blazemeter.我已经从 blazemeter 录制了 JMeter 脚本。 It is working fine in website.它在网站上运行良好。 When i run the jmx file Its throwing an error below..当我运行 jmx 文件时,它在下面抛出一个错误。

"alert("Something went wrong. Please try again");window.history.back();" "alert("出错了,请重试");window.history.back();"

This is the issue with JMeter script or application.这是 JMeter 脚本或应用程序的问题。 I am getting response from server 200.我收到来自服务器 200 的响应。

Most probably your script lacks correlation of the dynamic parameters (or it's not working properly)很可能你的脚本缺乏动态参数的相关性(或者它不能正常工作)

In the majority of cases you won't be able to just replay recorded script, modern web applications heavily rely on dynamic parameters for establishing user session , tracking client side state , security reasons and so on.在大多数情况下,您不能只重播录制的脚本,现代 web 应用程序严重依赖动态参数来建立用户 session 、跟踪客户端 state安全原因等。

So you need to identify all the parameters, extract them using suitable Post-Processors and replace recorded hard-coded values with the JMeter Variables originating from the Post-Processors.因此,您需要识别所有参数,使用合适的后处理器提取它们,并将记录的硬编码值替换为来自后处理器的JMeter 变量

And don't forget to add HTTP Cookie Manager to your test plan if it's not there yet.如果还没有,请不要忘记将 HTTP Cookie Manager 添加到您的测试计划中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM