Prevent Visual Studio Web Test from changing request details
Posted
by keithwarren7
on Stack Overflow
See other posts from Stack Overflow
or by keithwarren7
Published on 2010-03-28T18:53:19Z
Indexed on
2010/04/19
22:13 UTC
Read the original article
Hit count: 333
I have a service that accepts Xmla queries for Analysis services, often times those queries themselves will have a string that contains a fragment that looks something like
{{[Time].[Year].[All]}}
Recording these requests works fine but when I try to re-run the test I get an error from the test runner...
Request failed: Exception occurred: There is no context parameter with the name ' [Time].[Year].[All]' in the WebTestContext
This was confusing for some time but when I asked VS to generate a coded version of the test I was able to see the problem a bit better. VS searches for the '{{' and '}}' tokens and makes changes, considering those areas to refer to Context parameters, the code looks like
this.Context["\n\t[Time].[Year].[All]"].ToString()
Anyone know how to instruct Visual Studio to not perform this replacement operation? Or another way around this issue?
© Stack Overflow or respective owner