Visual Studio 2013终极Web性能测试URL编码 [英] Visual Studio 2013 Ultimate Web Performance Test URL Encoding

查看:108
本文介绍了Visual Studio 2013终极Web性能测试URL编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在提取此文件并将其用作后续请求中的查询字符串参数".连接令牌包含"+"  和  "+"  字符 正在被编码为'/'  没有被编码.

当我使用LINQPad通过System.Net.WebUtility.UrlEncode对连接令牌的实例进行编码时,字符串将按预期的方式编码为字符 '/'  becoming 

有没有其他人遇到过这个问题,如果是这样,您找到了解决方案吗?

解决方案

RichardFMartin您好,

感谢您在MSND论坛中发帖.

根据您的描述,如果要同时创建字符 和 '/'字符由用于网络性能测试的查询字符串参数中的URL编码属性编码.

我建议您可以尝试生成编码的Web性能测试或为Web测试请求插件中的查询字符串参数编写代码.

生成并运行编码的Web性能测试

如何:创建请求级插件

此外,我发现一些类似的主题,涉及如何通过Web Test Plug-in使用  Query String Parameter来为该URL编码处理代码,您可以引用它们,然后进行Web性能测试.

http://stackoverflow.com/questions/8838298/visual-studio-web-performance -测试

http://sqa.stackexchange /

希望对您有所帮助你!

最好的问候


I have recorded a short web performance test in Visual Studio 2013 Ultimate with update 4. There is a SignalR negotiate request that returns a connection token in its body.

I am extracting this and using it as Query String Parameter in a succeeding request. The connection token contains '+' and '/' characters so I have set URL Encode to true in the properties for the query string. When I run the test it fails. I can see that the '+' characters are being encoded, to '%2b' but the '/' are not being encoded.

When I use LINQPad to encode an instance of the connection token with System.Net.WebUtility.UrlEncode the string is encoded as expected with the '+' characters becoming '%2B' and '/' becoming '%2F'

Has anyone else come across this and if so have you found a solution?

解决方案

Hi RichardFMartin,

Thank you for posting in MSND forum.

According to your description, if you want to make both  the'+' characters and the '/' characters are encoded by the URL Encode properties in the Query String Parameter for web performance test.

I suggest you could try to generated a coded web performance test or write code for the Query String Parameter in the web test request plug-in.

Generate and run a coded web performance test

How to: Create a Request-Level Plug-In

In addition, I find some similar threads about how to hand code for this URL Encode with the  Query String Parameter by Web Test Plug-in, you could refer them and then apply your web performance test.

http://stackoverflow.com/questions/8838298/visual-studio-web-performance-test

http://sqa.stackexchange.com/questions/11946/redirect-containing-is-not-being-encoded-properly-by-visual-studio

Hope it help you!

Best Regards,


这篇关于Visual Studio 2013终极Web性能测试URL编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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