facing JavaScript required error when running vsts webtest

随声附和 提交于 2019-12-12 01:56:14

问题


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.


回答1:


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.

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.

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"

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.



来源:https://stackoverflow.com/questions/36565760/facing-javascript-required-error-when-running-vsts-webtest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!