<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx</link><description>From this post, I see many users are having trouble with file uploads. Really this is not as easy as it should be. To upload a file, first record the file upload. I have a simple site that I did that on to generate this web test. The key parameter here</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8835634</link><pubDate>Wed, 06 Aug 2008 04:59:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8835634</guid><dc:creator>ChuckvdL</dc:creator><description>&lt;p&gt;Thanks for going over this in detail Ed. &amp;nbsp;it seemed like an issue that came up over and over on the forums.. I know I must have answered it a bunch of times when I was more active there. &amp;nbsp;(and I expect you folks ended up pointing other people to my responses) &lt;/p&gt;
&lt;p&gt;it's great to have a step by step on this for process. &lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8836910</link><pubDate>Wed, 06 Aug 2008 13:30:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836910</guid><dc:creator>Amitai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When I build my test solution into &amp;quot;Release&amp;quot; folder and try to run my OrderdTest from the command line using &amp;quot;MSTest.exe&amp;quot; the webtest fails with an Exception:&lt;/p&gt;
&lt;p&gt;&amp;quot;Request failed: Exception in PreWebTest event: Could not load file or assembly 'AutomaticTesting.Utils&amp;quot;&lt;/p&gt;
&lt;p&gt;The assembly was placed by the build in my &amp;quot;Solution\Release&amp;quot; folder, and I am calling &amp;quot;MSTest.exe&amp;quot; from that exact folder.&lt;/p&gt;
&lt;p&gt;How can I expand the search path for &amp;quot;MSTest.exe&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;p.s.&lt;/p&gt;
&lt;p&gt;When ruining the tests from VSTS it executes as expected.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8836954</link><pubDate>Wed, 06 Aug 2008 13:49:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836954</guid><dc:creator>edglas</dc:creator><description>&lt;p&gt;Thanks Chuck, good to hear from you again!&lt;/p&gt;
&lt;p&gt;Ed.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8836962</link><pubDate>Wed, 06 Aug 2008 13:51:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836962</guid><dc:creator>edglas</dc:creator><description>&lt;p&gt;Amitai, mstest will look in the current directory for the dll. Are you in the release folder when you run mstest?&lt;/p&gt;
&lt;p&gt;Ed.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8837039</link><pubDate>Wed, 06 Aug 2008 14:29:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8837039</guid><dc:creator>Amitai</dc:creator><description>&lt;p&gt;Ed, &lt;/p&gt;
&lt;p&gt;Thanks for the quick answer.&lt;/p&gt;
&lt;p&gt;Yes I am in the release folder when running mstest.&lt;/p&gt;
&lt;p&gt;Any idea how I can proceed investigating this problem?&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8837072</link><pubDate>Wed, 06 Aug 2008 14:45:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8837072</guid><dc:creator>peterka</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;I used the option using the run config. I am also performing load testing uploading large files. My asp page has the Telerik upload control. One problem I have is with a query string parameter the telerik control inserts into the url to uniquely identify the file being uploaded as the control is streaming the file to the server. VS did not recognise the query string as a dynamic parameter. I need to assign a guid to the query string parameter for each run of the test script. Your thoughts on how to do this would be appreciated.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8837935</link><pubDate>Wed, 06 Aug 2008 19:08:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8837935</guid><dc:creator>edglas</dc:creator><description>&lt;p&gt;Peter, do you know how the guid gets generated?&lt;/p&gt;
&lt;p&gt;If it really is a GUID you need, write a request plugin that generates a guid into a context param in the PreRequest call using Guid.NewGuid().ToString(), then attach the plugin to your request and bind the value of the context parameter to the query string parameter.&lt;/p&gt;
&lt;p&gt;Ed.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8837963</link><pubDate>Wed, 06 Aug 2008 19:13:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8837963</guid><dc:creator>edglas</dc:creator><description>&lt;p&gt;Amitai, I would expect this to work.&lt;/p&gt;
&lt;p&gt;So to get this straight, from the command line you cd to the bin\release folder for your project, then run &lt;/p&gt;
&lt;p&gt;mstest /testcontainer:yourorderedtest.ordertedtest&lt;/p&gt;
&lt;p&gt;The ordered test contains a web test, which references a custom plugin in the AutomaticTesting.Utils.dll. &lt;/p&gt;
&lt;p&gt;Are the web test, ordered test, and dll all in the directory?&lt;/p&gt;
&lt;p&gt;If you just run the web test, does that work?&lt;/p&gt;
&lt;p&gt;Ed.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8840882</link><pubDate>Thu, 07 Aug 2008 13:37:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8840882</guid><dc:creator>Amitai</dc:creator><description>&lt;p&gt;Ed, I have a solution with more than 20 test projects, I have defined a Solution Release folder and all the projects files are placed there by the build.&lt;/p&gt;
&lt;p&gt;When I open &amp;nbsp;the &amp;quot;Visual Studio Command Prompt&amp;quot; and from there &lt;/p&gt;
&lt;p&gt; cd &amp;quot;MySolution\Release&amp;quot; &amp;nbsp;and then:&lt;/p&gt;
&lt;p&gt;MSTest.exe /testcontainer:&amp;quot;MyTests.orderedtest&amp;quot; /runconfig:&amp;quot;..\MyConfig.testrunconfig&amp;quot;&lt;/p&gt;
&lt;p&gt;Both&amp;quot; MyTests.orderedtest&amp;quot; and &amp;quot;MyConfig.testrunconfig&amp;quot; are found but &amp;nbsp;&amp;quot;MyFirstWebTest.webtest&amp;quot; is referencing &amp;nbsp;a custom plugin defined in AutomaticTesting.Utils.dll &amp;nbsp;and this .dll file is in &amp;quot;MySolution\Release&amp;quot;.&lt;/p&gt;
&lt;p&gt;The orderedtest and the dll are in the same directory and the webtest is in a sub directory of it.&lt;/p&gt;
&lt;p&gt;I am getting the same error if I try to run &amp;quot;MyFirstWebTest.webtest&amp;quot; directly.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Amitai&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8841965</link><pubDate>Fri, 08 Aug 2008 03:08:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8841965</guid><dc:creator>peterka</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;From investigations it appears that as the asp page is rendering, the Telerik upload control inserts a javascript function.&lt;/p&gt;
&lt;p&gt;Sys.Application.add_init(function() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$create(Telerik.Web.UI.RadProgressManager, {&amp;quot;ajaxCallUrl&amp;quot;:&amp;quot;/SchoolsGold/Telerik.RadUploadProgressHandler.ashx&amp;quot;,&amp;quot;clientStateFieldID&amp;quot;:&amp;quot;ctl00_DefaultContent_RadProgressManager1_ClientState&amp;quot;,&amp;quot;formId&amp;quot;:&amp;quot;aspnetForm&amp;quot;,&amp;quot;pageGUID&amp;quot;:&amp;quot;7a457cf2-2802-4352-947b-d04ee6238522&amp;quot;,&amp;quot;shouldRegisterForSubmit&amp;quot;:false}, null, null, $get(&amp;quot;ctl00_DefaultContent_RadProgressManager1&amp;quot;));&lt;/p&gt;
&lt;p&gt;The client side javascript of the telerik controls adds the PageGUID into the querystring.&lt;/p&gt;
&lt;p&gt;Would writing an extraction rule to and then use the context parameter to build the querystring be an good approach? &lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;
</description></item><item><title>re: Telerik file upload</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8848088</link><pubDate>Mon, 11 Aug 2008 16:18:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8848088</guid><dc:creator>edglas</dc:creator><description>&lt;p&gt;Peter, yes extracting the GUID from the ajax call response is the right way to go. I would have expected dynamic parameter detection to pick this up, but it missed it?&lt;/p&gt;
&lt;p&gt;Ed.&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8849675</link><pubDate>Tue, 12 Aug 2008 04:47:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8849675</guid><dc:creator>peterka</dc:creator><description>&lt;p&gt;Ed, unfortunately there was no dynamic parameter detected.&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#8850436</link><pubDate>Tue, 12 Aug 2008 13:21:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8850436</guid><dc:creator>Amitai</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;I am now able to run my webtests from the release folder :)&lt;/p&gt;
&lt;p&gt;I have added the Release folder to the Deployment section of my testrunconfig file, so all the Release folder content is copied to the Out folder under the Release\TestResults folder.&lt;/p&gt;
&lt;p&gt;This looks to me to be kind of a &amp;quot;Hack&amp;quot; :( &lt;/p&gt;
&lt;p&gt;Is this the only way to run MSTest.exe from a Release Build?&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;
&lt;p&gt;Amitai&lt;/p&gt;
</description></item><item><title>re: How to upload a file in a Web test</title><link>http://blogs.msdn.com/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx#9435901</link><pubDate>Fri, 20 Feb 2009 15:05:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435901</guid><dc:creator>Jamuna</dc:creator><description>&lt;p&gt;Hi Ed&lt;/p&gt;
&lt;p&gt;We are using VSTS for Peformance Testing of Sharepoint application.&lt;/p&gt;
&lt;p&gt;In the file upload scenario, i have added the file upload parameter &amp;amp; also deployed the file as a deployment item. However the upload does not happen successfully. I have the below queries:&lt;/p&gt;
&lt;p&gt;1. Can u pls elaborate on the file upload parameter. How to identify to which request it should be added? what should be entered in the the &amp;quot;Name&amp;quot; field of the file upload parameter?&lt;/p&gt;
&lt;p&gt;2. If the file is available in the &amp;quot;out&amp;quot; folder of the results directory, can we assume that we have correctly added the file as a deployment item to the test?&lt;/p&gt;
</description></item></channel></rss>