Web测试中相关请求的代理设置 [英] Proxy settings for dependent requests in web test

查看:72
本文介绍了Web测试中相关请求的代理设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我使用Web测试在Visual Studio 2012(和2015)中创建负载测试.我必须为我的Web测试设置一个代理(在Web测试属性中),并且对于单个请求它可以正常工作,但是对于从属请求,该代理设置似乎并不适用.在那儿 一种为依赖请求设置代理设置的方法?

I use web tests to create a load test with Visual Studio 2012 (and 2015). I have to set a proxy for my web tests (in web test properties) and it works fine for single requests but for the dependent request the proxy setting does not seem to apply. Is there a way to set proxy settings for dependent requests?

感谢Stefan

推荐答案

您好,Stefan Stoffe,

Hi Stefan Stoffe,

根据您的描述,您可以使用Web测试请求插件(而非Web测试插件)来实现您的想法.请参考以下MSDN文档:

https://msdn .microsoft.com/en-us/library/ms182554%28VS.80%29.aspx?f = 255& MSPPError = -2147217396

https://msdn.microsoft.com/en-us/library/ms182554%28VS.80%29.aspx?f=255&MSPPError=-2147217396

,然后将 PreWebTest 中的以下代码添加到 Web测试请求插件中的PreRequest 方法:

And then add the following codes in PreWebTest to the PreRequest method in web test request plugin:

https://blogs.msdn.microsoft.com/tfssetup/2016/05/31/how-to-add-a-web-performance-test-plug-in-to-authenticate-through-different-proxy-in-visual-studio-2015/

此致

奥斯卡


这篇关于Web测试中相关请求的代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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