开发者

VS.NET Load Testing - pass site URL via parameter

开发者 https://www.devze.com 2023-03-28 18:18 出处:网络
I\'m building VS.NEt 2010 Load Test solution. Everything works really good except one thing. When I record .webtest script - it grabs the site domain name, like so:

I'm building VS.NEt 2010 Load Test solution.

Everything works really good except one thing. When I record .webtest script - it grabs the site domain name, like so:

http://test1/page1 http://test1/page2

So the test1 is hardcoded in the script.

What I would like to do is to run same load test again different test environment - the goal is to compare two environment without rewriting the recording.

I see that Run Settings has "Context Parameter开发者_Python百科s" - is this it?


For for a recorded .webtest, this article shows using the context parameters with the {{parameterName}} syntax for form parameters, and can indeed be used for the server name.

From inside a coded test (which inherits from WebTest), you can access it with:

this.Context["KeyName"]
0

精彩评论

暂无评论...
验证码 换一张
取 消