<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Randomizing Input Data for Visual Studio Load Tests</title>
	<atom:link href="http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/</link>
	<description>dynaTrace Blog on Performance, Scalabilty and Architecture - Java and .NET  Application Performance Management</description>
	<lastBuildDate>Wed, 17 Mar 2010 14:43:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sebas</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-9116</link>
		<dc:creator>Sebas</dc:creator>
		<pubDate>Mon, 30 Nov 2009 00:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-9116</guid>
		<description>Didn&#039;t work for me either. It seems that Tyler and Ben are correct. The context parameters value DO change but too late. When you analyze the results you see that the Request use the hardcoded parameters values, and when you see the context tab, the values for the paramters are changed with the values from the plugin.

Andreas can you be so kind to post a complete working sample, send me you test project as you offer to Tyler.

I&#039;m using VS2008 SP1.

Best Regards.</description>
		<content:encoded><![CDATA[<p>Didn&#8217;t work for me either. It seems that Tyler and Ben are correct. The context parameters value DO change but too late. When you analyze the results you see that the Request use the hardcoded parameters values, and when you see the context tab, the values for the paramters are changed with the values from the plugin.</p>
<p>Andreas can you be so kind to post a complete working sample, send me you test project as you offer to Tyler.</p>
<p>I&#8217;m using VS2008 SP1.</p>
<p>Best Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Grabner</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-8003</link>
		<dc:creator>Andreas Grabner</dc:creator>
		<pubDate>Thu, 05 Nov 2009 13:55:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-8003</guid>
		<description>what version of visual studio do you use?</description>
		<content:encoded><![CDATA[<p>what version of visual studio do you use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-7993</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 04 Nov 2009 23:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-7993</guid>
		<description>I can confirm that this doesn&#039;t work. A WebTestRequestPlugin is triggered too late to change the context parameters for the current request.

If you make it a WebTestPlugin, you can set context parameters in the &quot;PreWebTest&quot; (NOT &quot;PreRequest&quot;), but of course at that stage you don&#039;t have any preceding request information.

Probably fine for what you&#039;re doing, but it doesn&#039;t work for me where I&#039;m requesting some data, then operating on that data to create input for the next request.</description>
		<content:encoded><![CDATA[<p>I can confirm that this doesn&#8217;t work. A WebTestRequestPlugin is triggered too late to change the context parameters for the current request.</p>
<p>If you make it a WebTestPlugin, you can set context parameters in the &#8220;PreWebTest&#8221; (NOT &#8220;PreRequest&#8221;), but of course at that stage you don&#8217;t have any preceding request information.</p>
<p>Probably fine for what you&#8217;re doing, but it doesn&#8217;t work for me where I&#8217;m requesting some data, then operating on that data to create input for the next request.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Grabner</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5921</link>
		<dc:creator>Andreas Grabner</dc:creator>
		<pubDate>Fri, 28 Aug 2009 17:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5921</guid>
		<description>Hi Tyler
Send me an email - it is my firstname.lastname@dynatrace.com
I can then send you my complete project that contains several plugins that I&#039;ve been working on</description>
		<content:encoded><![CDATA[<p>Hi Tyler<br />
Send me an email &#8211; it is my <a href="mailto:firstname.lastname@dynatrace.com">firstname.lastname@dynatrace.com</a><br />
I can then send you my complete project that contains several plugins that I&#8217;ve been working on</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5920</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Fri, 28 Aug 2009 16:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5920</guid>
		<description>I don&#039;t know how you got yours to work. This link illustrates my frustration.

http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/881b6969-2cd6-4e72-9417-8b70a22141a5</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know how you got yours to work. This link illustrates my frustration.</p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/881b6969-2cd6-4e72-9417-8b70a22141a5" rel="nofollow"></a><a href='http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/881b6969-2cd6-4e72-9417-8b70a22141a5'>http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/881b6969-2cd6-4e72-9417-8b70a22141a5</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5919</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Fri, 28 Aug 2009 16:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5919</guid>
		<description>I stepped through and watched the context variable being set to the random number, however the test used the static hard coded value.

I notice in your last image you do not have the Username context parameter defined anymore. Is this by design? it&#039;s a bit confusing.

We are using VS2008 SP1. Typical MS stuff.</description>
		<content:encoded><![CDATA[<p>I stepped through and watched the context variable being set to the random number, however the test used the static hard coded value.</p>
<p>I notice in your last image you do not have the Username context parameter defined anymore. Is this by design? it&#8217;s a bit confusing.</p>
<p>We are using VS2008 SP1. Typical MS stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5918</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Fri, 28 Aug 2009 16:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5918</guid>
		<description>public override void PreRequest(object sender, PreRequestEventArgs e)
        {
            base.PreRequest(sender, e);

            Guid guid = Guid.NewGuid();
            string value = &quot;tScrp&quot; + guid.ToString().Replace(&quot;-&quot;, &quot;&quot;).Substring(2, 15);
            foreach (string paramName in ParameterName.Split(&#039;,&#039;))
            {
                e.WebTest.Context.Add(paramName, value);
                                
            }
        }

the above code never updates the existing context parameter. 

The add throws me off, it would seem like I would want to update the parameter as opposed to adding an identically named parameter?</description>
		<content:encoded><![CDATA[<p>public override void PreRequest(object sender, PreRequestEventArgs e)<br />
        {<br />
            base.PreRequest(sender, e);</p>
<p>            Guid guid = Guid.NewGuid();<br />
            string value = &#8220;tScrp&#8221; + guid.ToString().Replace(&#8220;-&#8221;, &#8220;&#8221;).Substring(2, 15);<br />
            foreach (string paramName in ParameterName.Split(&#8216;,&#8217;))<br />
            {<br />
                e.WebTest.Context.Add(paramName, value);</p>
<p>            }<br />
        }</p>
<p>the above code never updates the existing context parameter. </p>
<p>The add throws me off, it would seem like I would want to update the parameter as opposed to adding an identically named parameter?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Grabner</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5910</link>
		<dc:creator>Andreas Grabner</dc:creator>
		<pubDate>Thu, 27 Aug 2009 20:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5910</guid>
		<description>Hi Tyler
The Context variable is actually a property from the passed PreRequestEventArg parameter. I access it via e.WebTest.Context. This property should always be valid and contain the current context including all context variables.

You have to make sure to specify all your expected context parameters in your test definition as it can be seen in the first screenshot

The example works fine on my Visual Studio 2008 Service Pack 1</description>
		<content:encoded><![CDATA[<p>Hi Tyler<br />
The Context variable is actually a property from the passed PreRequestEventArg parameter. I access it via e.WebTest.Context. This property should always be valid and contain the current context including all context variables.</p>
<p>You have to make sure to specify all your expected context parameters in your test definition as it can be seen in the first screenshot</p>
<p>The example works fine on my Visual Studio 2008 Service Pack 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5909</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Thu, 27 Aug 2009 20:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5909</guid>
		<description>The code as provided does not work. Either you keep the context variable in the webtest and it never gets updated, or you remove the context variable and the webtest crashes at that step saying cannot find context variable.</description>
		<content:encoded><![CDATA[<p>The code as provided does not work. Either you keep the context variable in the webtest and it never gets updated, or you remove the context variable and the webtest crashes at that step saying cannot find context variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asia Rencontres</title>
		<link>http://blog.dynatrace.com/2009/06/30/randomizing-input-data-for-visual-studio-load-tests/comment-page-1/#comment-5379</link>
		<dc:creator>Asia Rencontres</dc:creator>
		<pubDate>Thu, 16 Jul 2009 11:38:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynatrace.com/?p=588#comment-5379</guid>
		<description>Thanks for this post, was really useful for me!</description>
		<content:encoded><![CDATA[<p>Thanks for this post, was really useful for me!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
