Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 在VSTS2012中使用Web性能测试对基于MVC的应用程序进行负载测试_Visual Studio_Performance Testing - Fatal编程技术网

Visual studio 在VSTS2012中使用Web性能测试对基于MVC的应用程序进行负载测试

Visual studio 在VSTS2012中使用Web性能测试对基于MVC的应用程序进行负载测试,visual-studio,performance-testing,Visual Studio,Performance Testing,我正在使用VSTS2012对一个web应用程序进行负载测试,它是在MVC和Telerik控件上设计的。我创建了一个web性能测试,当我运行相同的测试时,它失败了,在表单提交时出现以下错误 HTTP/1.1 500 Internal Server Error X-AspNetMvc-Version : 4.0 X-UA-Compatible : IE=edge Content-Length : 241 Cache-Control : private Content-Type : text/html

我正在使用VSTS2012对一个web应用程序进行负载测试,它是在MVC和Telerik控件上设计的。我创建了一个web性能测试,当我运行相同的测试时,它失败了,在表单提交时出现以下错误

HTTP/1.1 500 Internal Server Error
X-AspNetMvc-Version : 4.0
X-UA-Compatible : IE=edge
Content-Length : 241
Cache-Control : private
Content-Type : text/html; charset=utf-8
Date : Mon, 12 May 2014 07:22:45 GMT
Server : Microsoft-IIS/8.5
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
请有人帮忙,它正在正确地记录所有内容,但无法正常运行


另外,请建议,对基于MVC的应用程序进行负载测试是否有不同的方法?这个问题没有具体的答案,因为有很多可能的原因

通常发生此错误是因为web测试中未正确处理动态数据。VisualStudio可以检测许多动态参数,但无法检测网站设计者所做的所有聪明的事情。例如,对登录请求的响应包含一个值,该值必须在该登录会话中的所有后续请求中作为表单参数返回。故障可能是发送的实际请求包含录制会话的值,而不是新会话的值。发送旧值可能会混淆网站,导致“内部服务器错误”响应

一种解决方案是记录两个尽可能相同的web测试。然后用文本比较程序比较这两个“.webtest”文件。有时可能需要记录其他几乎相同的测试,但例如,以不同用户的身份登录。会有一些差异,如思考时间和GUID,应该忽略。但在发送的请求中也可能存在重大差异。在发现差异后,搜索这些值在网站的响应中最先出现的位置。使用提取规则将值放入上下文参数中,然后将该上下文参数插入到需要它的请求中