VSTS在执行Web测试时不会绘制页面。 [英] VSTS does not paints the page while performing web test.

查看:68
本文介绍了VSTS在执行Web测试时不会绘制页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hello All,

Hello All,

我正在运行webtest。由vsts生成的代码的一部分是:

I am runing a webtest . Some part of the code generated by vsts is :

WebTestRequest request42 = new WebTestRequest("some url");

  request42。 Method =" POST"; $
  request42.Headers.Add(new WebTestRequestHeader(" content-type"," application / x-www-form-urlencoded; charset = UTF-8" ;));

WebTestRequest request42 = new WebTestRequest("some url");
 request42.Method = "POST";
 request42.Headers.Add(new WebTestRequestHeader("content-type", "application/x-www-form-urlencoded; charset=UTF-8"));

request42.QueryStringParameters.Add(" sessionToken",sTemp3,false,false);
$
request42.QueryStringParameters.Add (" _"," 1313073312760",false,false);

request42.QueryStringParameters.Add("sessionToken", sTemp3, false, false);
request42.QueryStringParameters.Add("_", "1313073312760", false, false);

FormPostHttpBody request42Body = new FormPostHttpBody();

request42.Body = request42Body;

收益率返回请求42;

request42 = null;

FormPostHttpBody request42Body = new FormPostHttpBody();
request42.Body = request42Body;
yield return request42;
request42 = null;

 

这里我收到以下行的错误:

Here I m getting error for the following line:

  request42.Method =" POST";

 request42.Method = "POST";

&

FormPostHttpBody request42Body = new FormPostHttpBody();

request42.Body = request42Body;

FormPostHttpBody request42Body = new FormPostHttpBody();
request42.Body = request42Body;

如果我从代码中注释掉这些行,webtest运行成功完成(没有任何错误)但是VSTS没有绘制网页浏览器中的页面。

If I comment out these lines from code, the webtest run completes successfully(without any error) but VSTS does not paints the page in its Web browser.

任何人都可以告诉我是否可以在其中制作油漆颜料VSTS浏览器也是......如果需要在代码中进行更改。

Can anybody plz tell me if it is possible to make the paint paint in  VSTS browser also..and if it is what changes need to be done in the code.

 

谢谢和问候

 

推荐答案

如果网址需要POST请求,则不应评论Method =" POST"。

If the url expecteds a POST request, you should not comment the Method="POST".

您可能正在向服务器发送陈旧请求,如会话变量等。请参阅这些文章来调试问题:

You might be sending a stale request to the server like session variables, etc. Refer these articles to debug the issue:

http://blogs.msdn.com/b/edglas/archive/2010/03/24/web-test-authoring-and-debugging-techniques-for-visual-studio-2010.aspx

http://blogs.msdn.com/b/slumley/arc hive / 2007/04/10 / how-to-debug-a-web-test.aspx

如果您的服务器正在编写任何文件,它可能会有所帮助事件日志之类的日志。您可能会在那里看到错误的原因。如果实现了,也可能会在响应页面中看到错误消息。

It might be helpful if your server is writing any kind of logs like event logs. You might see the cause of the error there. Also you might see the error message in the response page if that is implemented.

谢谢,

Anuj


这篇关于VSTS在执行Web测试时不会绘制页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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