Visual Studio Performance Test file upload parameter prefixes date
<p>I have a problem that hopefully has an easy solution I am overlooking... this is my first time using file upload parameters with Visual Studio performance test tools. When I first ran my web performance test, my test found the file and uploaded it as I expected. However, when I re-run the test now, I get a 500 Internal Server error in the "Details" section of the results, and I noticed that my filename includes what appears to be a timestamp prefixed to the correct name in the request. Since my filename isn't changing, this causes visual studio to fail to find my document. </p>

<p>I generated code for this test because I needed to reset the SSL settings manually. My document is moved to the Test Results folder because I decorated the method with it as a DeploymentItem. Visual studio did this automatically when I generated the code, which was very nice but could be the issue... Any help would be greatly appreciated! Here's the POST request I'm making:</p>

<pre><code>WebTestRequest request11 = new WebTestRequest((this.Context["Environment"].ToString() + "/Submit/Upload"));
request11.Method = "POST";
request11.Headers.Add(new WebTestRequestHeader("Referer", (this.Context["Environment"].ToString() + "/Submit/Index/fakefolder456")));
FormPostHttpBody request11Body = new FormPostHttpBody();
request11Body.FormPostParameters.Add(new FileUploadParameter("files", "Test3.pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", true));
request11Body.FormPostParameters.Add("folderId", "fakeId123");
request11Body.FormPostParameters.Add("fileNamePairs", "[{\"OriginalFileName\" : \"Test3.pptx\",\"NewFileName\" : \"Test3.pptx\"}]");
request11Body.FormPostParameters.Add("__RequestVerificationToken", this.Context["$HIDDEN1.__RequestVerificationToken"].ToString());
request11.Body = request11Body;
yield return request11;
request11 = null;
</code></pre>