简体   繁体   English

Web 性能和负载测试 - https 站点

[英]Web performance and load test - https site

During the playback of a web performance and load test, Visual Studio reports error 401 (Unauthorized) on a https site.在回放 Web 性能和负载测试期间,Visual Studio 在 https 站点上报告错误 401(未授权)。 In the properties of the test I included my credentials.在测试的属性中,我包含了我的凭据。 Is https supported with this type of project?此类项目是否支持 https?

If you have recorded scripts in the top ribbon menu of a webtest find Set Credentials icon and enter the right credentials there or...如果您在 webtest 的顶部功能区菜单中记录了脚本,请找到“设置凭据”图标并在那里输入正确的凭据或...

Try generating your recorded script to code (On the left upper corner you have Generate to code icon) and then add尝试生成您录制的脚本来编码(在左上角您有生成到编码图标),然后添加

    this.UserName="enterusername";
    this.Password="enterpassword";

Like this:像这样:

     public override IEnumerator<WebTestRequest> GetRequestEnumerator()
    {
        this.UserName = "username";
        this.Password = "password";

         //code...
    }

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

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