运行vsts Webtest时遇到JavaScript必需的错误 [英] facing JavaScript required error when running vsts webtest

查看:94
本文介绍了运行vsts Webtest时遇到JavaScript必需的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在许多面对https的VSTS 2010 Ultimate中运行记录的Webtest面对JavaScript必需的错误时,请帮助我进一步进行负载测试.

when running recorded webtest in VSTS 2010 ultimate facing JavaScript required error for many https requests, please help me to take it further for load testing.

推荐答案

Visual Studio的Web测试发送和接收HTTP(S)消息.它们不执行JavaScript或与网页上的任何其他活动"元素或与之无关.网页上的任何Javascript活动都必须在网络测试中进行模拟.

Visual Studio's web tests send and receive HTTP(S) messages. They do not execute or have anything to do with JavaScript or any other "active" elements of the web pages. Any Javascript activity by the web pages must be simulated in the web test.

通常,网页具有HTML来显示要求使用Javascript的消息.这些网页具有Javascript代码,该Javascript代码用所需的信息覆盖该消息.因此,当Javascript不可用时,页面将显示默认消息.

Often web pages have HTML to display a message that Javascript is required. These web pages have Javascript code that overwrites that message with the information that is wanted. Hence when Javascript is not available the page shows the default message.

您的网络测试需要创建JavaScript会创建的请求.这并不意味着要运行JavaScript代码,而是要找到要发送的请求并创建它们.为了进行测试,我建议您了解动态参数"

Your web test needs to create the requests that JavaScript would have created. That does not mean running JavaScript code, it means finding what requests are sent and creating them. For your testing I recommend that you learn about "dynamic parameters"

此网页讨论了问题中所描述的确切问题,它给出了原因,但没有给出解决方案.请参阅有关即使测试失败也可以成功进行Web测试"的部分.它还有一个关于调试Web测试以查找和修复动态参数"的好部分. 此页面对如何解决有一些很好的描述许多创作问题.

This web page discusses the exact problem described in the question, it gives reasons but not solutions. See the section about "Web Tests Can Succeed Even Though It Appears They Failed". It also has a good section on "Debugging a Web Test to Find and Fix Dynamic Parameters". This page has some good descriptions of how to solve many creation issues.

这篇关于运行vsts Webtest时遇到JavaScript必需的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆