Visual Studio Team System - Testing ForumDiscuss the unit testing, code coverage, and other general testing tools in Visual Studio Team System.© 2009 Microsoft Corporation. All rights reserved.Sun, 29 Nov 2009 22:16:58 Z596e5f89-2b6c-4ee5-95fd-98f570a71b83http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/72992aa0-c56e-45c2-a543-f744c8e298d8http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/72992aa0-c56e-45c2-a543-f744c8e298d8Insektohttp://social.msdn.microsoft.com/Profile/en-US/?user=Insekto150 Authenticated Users Logged in SimultaneouslyI want to simulate simultaneously logging in of 150 authenticated users and have these users perform transactions. How do I do that in VSTS 2008?Sun, 29 Nov 2009 22:16:57 Z2009-11-29T22:16:58Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b9a07491-0b66-485b-a25e-138f326caa71http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b9a07491-0b66-485b-a25e-138f326caa71aruizmoraleshttp://social.msdn.microsoft.com/Profile/en-US/?user=aruizmoralesMicrosoft.VisualStudio.TestTools.UITesting.dll HeeeeeelpppppI need to find the Microsoft.VisualStudio.TestTools.UITesting.dll. I'm using Visual Studio Team Suite.<br/><br/>Where is this dll located so I can reference it on my project ? <br/>Sun, 29 Nov 2009 10:34:38 Z2009-11-29T10:34:39Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/dbe92d52-7846-48fb-a21f-b550924d8d93http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/dbe92d52-7846-48fb-a21f-b550924d8d93SamerGhosnhttp://social.msdn.microsoft.com/Profile/en-US/?user=SamerGhosnVSTS Web Test results when after run are not updated with new values<p class=MsoNormal style="margin:0in 0in 10pt"><span style="line-height:115%;font-family:'Verdana','sans-serif';color:black;font-size:8pt">Hi,<br/>I have an ASPX page that stores data in a SharePoint item. this page has a control named ID, once ID is filled and the button &quot;Get Information&quot; is clicked, the system will fetch data from SQL server and stores data in my controls. Next, I click on save and the system grabs data from the UI and store in the item in SharePoint.<br/><br/>I have recorded a web test with the above action and run it.<br/>Everything fine till now. Next, I have modified my SQL data and change the value of the ID in a way that when &quot;Get information&quot; is pressed, the system should not find anything.<br/>I have run the Web Test again and the system displays the same data as the previous test when the ID was valid.<br/><br/>Is this a normal behavior? Shouldn’t the test results display the up-to-date situation of the actual data?<br/><br/>Thanks, <br/>Samer</span></p>Fri, 27 Nov 2009 21:54:30 Z2009-11-27T21:54:30Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d388fd98-b5a0-44c3-9774-6d1401a9b3cahttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d388fd98-b5a0-44c3-9774-6d1401a9b3cadlkdfjlfjlkdhttp://social.msdn.microsoft.com/Profile/en-US/?user=dlkdfjlfjlkdURGENT: Test method TestProjectsucceed.Form1Test.AddTest threw exception: System.TypeLoadException: Could not load type 'Smart.F<p align=left><font face=Arial size=2></font> </p> <p style="margin:0in 0in 10pt 73.5pt;line-height:normal"><span style="font-size:15pt;font-family:'Times New Roman','serif'">Hi guys,<br>I set up the VSTS 2008 and write a little program to to try to use the the 'unit test', but when I run the following coding and want to test the fuction 'Add', I alway got the failed result with the error prompt : Test method TestProjectsucceed.Form1Test.AddTest threw exception:  System.TypeLoadException: Could not load type 'Smart.Form1' from assembly 'Smart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.. <br><br>        /// &lt;summary&gt;<br>        ///A test for Add<br>        ///&lt;/summary&gt;<br>        [TestMethod()]<br>        public void AddTest()<br>        {<br>            Form1 target = new Form1(); // TODO: Initialize to an appropriate value<br>            int a = 1; // TODO: Initialize to an appropriate value<br>            int b = 2; // TODO: Initialize to an appropriate value<br>            int expected = 3; // TODO: Initialize to an appropriate value<br>            int actual;<br>            actual = target.Add(a, b);<br>            Assert.AreEqual(expected, actual);<br>          }<br><br>could you help me out with this problem? I set up the VSTS normally with no other configurations, did I missed something?<br><br>thanks,<br></span></p>Thu, 26 Jun 2008 07:21:50 Z2009-11-27T16:02:43Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d43cdead-82d0-4cf3-961c-149ab598faf4http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d43cdead-82d0-4cf3-961c-149ab598faf4davidlkshttp://social.msdn.microsoft.com/Profile/en-US/?user=davidlksGeneric Test AbortedHi, I am using Visual Studio 2010 to do some evaluation for Test Automation. I am facing the generic test get aborted when I try to follow the instruction creating it. (http://msdn.microsoft.com/en-us/library/ms182626.aspx) The strange thing is it works as expected (the result show pass) for the first time when I click 'Run all test in solution'. But after the first run, if i click again it will show 'Aborted' in the result. I need to close the solution and reopen it again. Then only the first click for 'Run all test in solution' will pass. May I know is there anything that I need to configure so that I can get rid of this hassle? Thanks for the help, DavidFri, 27 Nov 2009 12:20:41 Z2009-11-27T12:20:41Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d07bdb9b-f5d2-401e-b833-6497c07624cehttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d07bdb9b-f5d2-401e-b833-6497c07624ceDennis Riishttp://social.msdn.microsoft.com/Profile/en-US/?user=Dennis%20RiisMSTest fails during build on TFS ServerI am having a problem with my tests that shold run as part of a build on the TFS Server. The MSTest.exe task fails with the following error: <div><br/></div> <div>  Failed to queue test run 'tfsservice@V-TFSERVER 2009-11-26 10:37:44_Any CPU_Release': Failed to write to an IPC Port: The pipe is being closed.</div> <div><br/></div> <div>After the run, all the tests are reported as &quot;Not executed&quot;. If I run the same tests in Visual Studio, there is no problem. I have another build on the server (in another Team Project), where tests are being run just fine.</div> <div><br/></div> <div>What might be the cause of this, and how can I fix it ? </div> <div><br/></div> <div>Thanks,</div> <div><br/></div> <div>Dennis Riis</div>Thu, 26 Nov 2009 10:15:52 Z2009-11-26T10:15:53Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0a86d045-536e-4f79-81ec-befff64a2454http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0a86d045-536e-4f79-81ec-befff64a2454Arun Dharumanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Arun%20DharumanMethod is called from my TestMethod only when running in debug mode<p>Hi,<br/>I'm writing Unit test cases in Visual Studio 2008. I'm facing a weird problem.</p> <p>From my TestMethod I'm calling a library method. This method is being called when I debug the TestMethod, but when I run the TestMethod this method is not being called.</p> <p>I checked the references of the dll's, they are perfecly intact.</p> <p>Please help me to sort out this issue.</p> <p>Regards,<br/>ArunDhaJ</p>Thu, 19 Nov 2009 07:07:33 Z2009-11-26T02:41:04Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/5415dd5a-96ff-4db7-ad81-0acd3d66a193http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/5415dd5a-96ff-4db7-ad81-0acd3d66a193Murali1225http://social.msdn.microsoft.com/Profile/en-US/?user=Murali1225How to export .coverage file to xml file<p>Hi,</p> <p> </p> <p>I have code coverage output file in the format .coverage, I want to export to xml file.</p> <p>I tried gooling all the articles but I couldn't find the proper solution to it.</p> <p>If any body knows about this export  info from .coverage file to xml, plz share with me.</p> <p> </p> <p>Thanks</p> <p>--Murali</p>Tue, 24 Nov 2009 06:52:11 Z2009-11-25T06:05:51Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0dff1507-1e1c-45b8-9121-575bf34a8e63http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0dff1507-1e1c-45b8-9121-575bf34a8e63vibha4281684http://social.msdn.microsoft.com/Profile/en-US/?user=vibha4281684am unable to open sharepoint 2007 site in Visual studio team suitsHello Friends, <br/><br/>I have a requriement where I need to test sharepoint 2007 site. I need to do stress testing as well as performance testing.  I have downloaded Visual studio 2008 Team suits. when I try to open the site here, it says that visual studio doesn't allow to open sharepoint sites. <br/><br/>can some one tell me how can I perform these testing?<br/><br/>your suggestions are welcomed.<br/><br/>thank you<br/><br/>Regards<br/>VibhaTue, 24 Nov 2009 04:16:41 Z2009-11-25T05:48:09Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/cd861f8a-eb49-46c8-b828-3e97abff949fhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/cd861f8a-eb49-46c8-b828-3e97abff949fJay R. Wren evarlasthttp://social.msdn.microsoft.com/Profile/en-US/?user=Jay%20R.%20Wren%20evarlastException has been thrown by the target of an invocation when clicking run test in team suite mstest<div class=moz-text-plain lang=x-western style="font-size:13px;font-family:-moz-fixed"><pre>I'm using Visual Studio 2008 Team Suite and i was able to run tests<br>until a couple of weeks ago.<br><br>I run VS as myself in Vista as my user account which is non-admin and<br>UAC enabled. I get &quot;Exception has been thrown by the target of an<br>invocation.&quot; OK message box when clicking run test in team suite mstest.<br><br>If I open the exact same solution in VS running as administrator the<br>test will run.<br><br>I watched process access in procmon and noticed that as non-admin the<br>MSTestHost.exe process is never even started, so it doesn't get that far.<br><br>I'm limp along running VS as admin, but I would really like to get back<br>to my old dev environment. Can anyone help?<br><br>--<br>Jay R. Wren<br></pre></div>Fri, 12 Sep 2008 01:24:33 Z2009-11-24T13:58:21Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b167b843-cc89-4dcf-a115-86d2768ee1d3http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b167b843-cc89-4dcf-a115-86d2768ee1d3pri ramhttp://social.msdn.microsoft.com/Profile/en-US/?user=pri%20ramtesting svc fileI am a QA person. I am currently working on a project where the developer has created bunch of svc files (services). I have been asked to test these services. I am new to testing services. I have very minimal coding experience. Is there an easy way to test this? Please guide me or point me to the right direction. Thanks!Mon, 23 Nov 2009 15:28:08 Z2009-11-27T02:39:56Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/82d84a13-2330-442c-8d9f-7014181c0d53http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/82d84a13-2330-442c-8d9f-7014181c0d53Yeandyhttp://social.msdn.microsoft.com/Profile/en-US/?user=YeandyHow to schedule an automated test in VSTS 2010 ?I am evaluating VSTS 2010 Testing. How to schedule an automated test  in VSTS 2010 ?Sat, 21 Nov 2009 20:23:05 Z2009-11-27T02:38:21Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1c4081de-6080-4977-9fbe-da1043795f53http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1c4081de-6080-4977-9fbe-da1043795f53MichaelLincolnhttp://social.msdn.microsoft.com/Profile/en-US/?user=MichaelLincolnno code coverage data<p>I have performed some unit tests, but I still cant find the code coverage data. Why? Miss somethin?</p>Sun, 22 Nov 2009 12:26:40 Z2009-11-27T02:41:10Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ccb12cca-2359-429b-8d8c-88cb7f0b2192http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ccb12cca-2359-429b-8d8c-88cb7f0b2192J.Spraulhttp://social.msdn.microsoft.com/Profile/en-US/?user=J.SpraulBest practices trying to use the same unit test on desktop & device?<p>I want the same unit tests to run on both the desktop &amp; the device. Is there any recommended means of accomplishing this? Getting started I just use two projects referencing the same files:</p> <p>    DeviceTestProject<br>        |_ SharedUnitTest1.cs<br>    DesktopTestProject<br>        |_ SharedUnitTest1.cs (same file / linked)</p> <p>In the test list the @storage attribute for the test can only point to one of these. Any use of TestContext (ClassInitialize, etc.) causes the following, somewhat expected, error:</p> <p>Unable to set TestContext property for the class [...]:  System.ArgumentException: Object of type 'Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapterContext' cannot be converted to type 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext'<br></p>Fri, 13 Feb 2009 18:07:37 Z2009-11-21T00:08:12Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/7fc705b6-48a7-4998-aa75-b29847ce4986http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/7fc705b6-48a7-4998-aa75-b29847ce4986dgedge33http://social.msdn.microsoft.com/Profile/en-US/?user=dgedge33Unit test failed on assembly built from netmodulesHi all, I'm facing a similar problem decribed in this post http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/a15f8a4b-b869-4a35-ac72-57f783bdd7b7. <br/> I build an assembly from net modules using al.exe. <br/> The reason why I split assembly into several net modules is because some modules are written in C# and other in C++/cli. <br/> I choose net modules instead of assemblies because I want only one assembly as a result. <br/> As rockeye, I identify static block initializer as source of my exception: <br/> Test method TestProject1.UnitTest2.TestMethod1 threw exception: System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour ''. ---&gt; .ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain. <br/> ---&gt; System.BadImageFormatException: Le module était censé contenir un manifeste de l'assembly. (Exception de HRESULT : 0x80131018). <br/> <br/> I succeed in having a small test case reproducing the problem: <br/> <ul> <li> a C++ class library which represent the C++ API I want to interop with</li> <li>a net module which make interoperability.</li> </ul>   <pre>// TestModule.h #pragma once #include &quot;../ClassLibrary/ClassLibrary.h&quot; using namespace System; namespace TestModule { public ref class Class1 { // TODO: Add your methods for this class here. }; } #pragma unmanaged public class NativeClass { private: static CClassLibrary staticDataMember; }; #pragma managed </pre> <br/> <pre>// TestModule.cpp #include &quot;stdafx.h&quot; #include &quot;TestModule.h&quot; #pragma unmanaged CClassLibrary NativeClass::staticDataMember; #pragma managed</pre> <ul> <li>an assembly linked with the net module with assembly manifest. </li> <li>a test project which test a reference class of the assembly. </li> </ul> If I run tests outside VS with the /noisolation switch, all tests are successfull. <br/> If I remove the static block, tests run inside VS are OK. <br/> If I build the module as an assembly with the static block and run tests inside VS, tests are OK. <br/> Why when spliting assembly in modules tests fail ? I've a small test case which reproduced the problem (tested under win xp-pro 32bits VS Team 2008). <br/> <br/> Thanks.Mon, 20 Jul 2009 12:56:34 Z2009-11-20T15:34:29Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/3f255d39-12b9-4a1a-8e1c-5a55d966376chttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/3f255d39-12b9-4a1a-8e1c-5a55d966376cwedge76http://social.msdn.microsoft.com/Profile/en-US/?user=wedge76Tests in a solution with several projects breaksWe just moved from NUnit to MSTest in order to get a good collaboration with TFS.<br/> Now we have a solution with several projects approx like this:<br/> <br/> Solution<br/>   ProjectA<br/>   ProjectA.Test<br/>     ProjectATestFiles<br/>       Testsourcefiles<br/>   ProjectB<br/>   ProjectB.Test<br/>     ProjectBTestFiles<br/>       Testsourcefiles<br/>   ProjectC<br/>   ProjectC.Test<br/>     ProjectCTestFiles<br/>       Testsourcefiles<br/> <br/> <br/> Out folder of Testresult looks like this:<br/> <br/> ProjectATestFiles<br/>       Testsourcefiles<br/> ProjectBTestFiles<br/>       Testsourcefiles<br/> ProjectCTestFiles<br/>       Testsourcefiles<br/> &lt;assemblies&gt;<br/> <br/> Within each test project we have a folder called &quot;Testsourcefiles&quot; where are some xml files included for unit tests (different files for the different projects). The files are marked as &quot;Copy always&quot;. The test methods do have the DeploymentItem attribute in order to copy the files to the testresults folder.<br/> The tests are running successfully for each particular project when we run them separate. <br/> <br/> But when we run all tests of all projects in the solution together, some of the tests fail. It seems as though it gets a mess with the xml files. <br/> For instance, a test from ProjectC.Test fails because a file was not found. After a check in the testresult folder the files for ProjectC.Test are missing but the files from ProjectA.Test are in there.<br/> <br/> Thanks in advance for your help.<br/> PeterMon, 16 Nov 2009 08:55:42 Z2009-11-23T02:33:59Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b076b3be-f361-4c61-a6ce-ba0b61e30016http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b076b3be-f361-4c61-a6ce-ba0b61e30016JWNewhttp://social.msdn.microsoft.com/Profile/en-US/?user=JWNewSkype Extension icon causes webtest to Fail<span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre">I have a web page with a Skype Extension and AOL IM status indicator. When I record a webtest that navigates that page, the webtest records those two url's. The issue is during webtest playback, when those two url's cause the test to fail. However, the test script does not have those two calls recorded, so I can't delete them. I'd like to delete the unnecessary call to those two url's, so that my webtest can get a Pass result.</span></span> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre"><br/></span></span></div> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre">Here are the two lines that fail:</span></span></div> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre">http://api.oscar.aol.com/presence/icon?k=ad1qwyjuGExH_KCB&amp;t=</span></span></div> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre">http://mystatus.skype.com/bigclassic/</span></span></div> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre"><br/></span></span></div> <div><span style="font-family:Arial;font-size:small"><span style="font-size:13px;white-space:pre">These are just status indicators for Skype and AOL. I'd like to remove the calls to them because they are not a necessary element of my webtest. However, there's no mention of these two calls in the Webtest script. The two lines only show up during playback, when they subsequently fail giving the entire test a &quot;Failed&quot; result.</span></span></div>Thu, 19 Nov 2009 19:28:25 Z2009-11-23T17:15:52Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/8418d178-eac0-4068-8e35-d79db3bcda17http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/8418d178-eac0-4068-8e35-d79db3bcda17MichaelLincolnhttp://social.msdn.microsoft.com/Profile/en-US/?user=MichaelLincolnabout unit test runningHow can I run unit test with mstest? How to specify a test?Thu, 19 Nov 2009 16:14:45 Z2009-11-26T02:40:31Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/f7483790-0409-4bd7-a6da-6afc040e503dhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/f7483790-0409-4bd7-a6da-6afc040e503dGerman Schuagerhttp://social.msdn.microsoft.com/Profile/en-US/?user=German%20Schuagermstest + vs package + command lineHi, I'm trying to run a set of integration tests that uses <span style="font-family:'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;font-size:13px;color:#333333;line-height:16px;white-space:pre">[HostType( &quot;VS IDE&quot; )] from the command line (actually as part of my continuous integration process), but mstest.exe keeps throwing some error that prevents the tests from passing.</span> <div><span style="font-family:'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;color:#333333;font-size:small"><span style="font-size:13px;line-height:16px;white-space:pre">There is another thread about this issue but I think that maybe someone here can have a better idea: <span style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;line-height:normal;white-space:normal"><a href="http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/85a2abee-61d4-44c6-9645-b7a47cdadbc9">http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/85a2abee-61d4-44c6-9645-b7a47cdadbc9</a></span></span></span></div> <div><br/></div> <div>Cheers,</div> <div>Germán.</div>Wed, 18 Nov 2009 12:21:45 Z2009-11-20T03:29:33Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/9c53003b-996b-40d7-a516-3adde674aa90http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/9c53003b-996b-40d7-a516-3adde674aa90Gaspar Nagyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Gaspar%20NagyVS/MsTest does not refresh tests automatically if they generated by a SingleFileGeneratorHi,<br/> <br/> I have a SingleFileGenerator that can generate MsTest test classes from another source. (The SingleFileGenerator is invoked whenever I save the source file by Visual Studio. Also VS takes care of saving the generated test classes to the behind file.)<br/> <br/> It works generally great, but there is a strange situation (which is quite frustrating):<br/> 1. I some tests already generated.<br/> 2. I run all tests in the solution. -&gt; works fine<br/> 3. I modify something in my source file, that results in a new test method in the test class.<br/> 4. I save the file, the SingleFileGenerator is generating the updated test class with the new method.<br/> 5. I build (even rebuild) and again run all tests in the solution. -&gt; the newly added test method is not included!<br/> <br/> It seems that the test engine did not realize that the test class has been updated. Build/rebuild does not help, the only way to run the new test is to a) touch the generated file manually and save b) click the &quot;refresh&quot; button on the &quot;Test View&quot; window.<br/> <br/> My suspicion is that the test runner is somehow triggers the refresh event only when the test class file is interactively changed (someone types something in), and not when the Visual Studio updates anyhow the file content. <br/> <br/> Is there any way to fix / workaround this issue?<br/><hr class="sig">Gaspar Nagy / TechTalkWed, 04 Nov 2009 11:43:11 Z2009-11-20T03:00:16Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/732775b5-48a2-4820-927f-38397a917cf1http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/732775b5-48a2-4820-927f-38397a917cf1BHoppehttp://social.msdn.microsoft.com/Profile/en-US/?user=BHoppeHow can I add an input/property to a coded web test?I have a coded web test and I need a way for the user running the test to provide input to the test without having to change the code. For example, it could be a string property that allows the user to specify the URL that the coded web test will use to test against. <br/> <br/> I've tried do handle this similar to a web test plug-in by adding a property to the coded web test and hoping that I could right-click on the test in the Test View window and click 'Properties' and be able to have the property show up in the property window. Just like you can do with a plug-in. of course, this didn't work.<br/> <br/> Any way I can do this?Thu, 19 Nov 2009 23:07:53 Z2009-11-19T23:07:54Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1422bfb0-a637-430c-a2bf-0b199a02f013http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1422bfb0-a637-430c-a2bf-0b199a02f013digitighttp://social.msdn.microsoft.com/Profile/en-US/?user=digitigVS2010 Ultimate Beta -- can't find localtestrun.testrunconfigI'm trying to get code coverage results for my VS2010 C# project, but all of the documentation I can find tells me to edit the <span>localtestrun.testrunconfig </span> file, which I can't find. Is this managed differently under VS2010?<br/>Thu, 19 Nov 2009 18:08:00 Z2009-11-19T22:53:41Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/23b7df1c-6f54-4fac-bd05-80b0717781bbhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/23b7df1c-6f54-4fac-bd05-80b0717781bbMichaelLincolnhttp://social.msdn.microsoft.com/Profile/en-US/?user=MichaelLincolnconfused about unit testWhat is the differences between the method with attribute testinitialize and classinitialize?Thu, 19 Nov 2009 16:12:59 Z2009-11-20T07:07:27Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d3f43dcd-628c-4d92-b504-253c850a527ahttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/d3f43dcd-628c-4d92-b504-253c850a527asukashttp://social.msdn.microsoft.com/Profile/en-US/?user=sukasSelecting specific records from CSV file DataSource in a web testHi <div><br/></div> <div>I have a situation where we need to select only specific records from a CSV DataSource File based on a condition.</div> <div><br/></div> <div>We have a large CSV file containing a collection of Addresses (Street Address, City, State, Zip). Then there is a Web Test that uses these addresses.</div> <div>Now the issue is that I would want to use the addresses that only have a particular city, say the city of the logged in user, during the test run.</div> <div><br/></div> <div>I'm pretty new to Web Testing. So this might be a silly question. But can someone help me with this?</div> <div><br/></div> <div>Thanks.</div>Wed, 18 Nov 2009 16:28:17 Z2009-11-19T14:54:01Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/e8b816da-49b5-42ca-9b92-fb5c7be7b92fhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/e8b816da-49b5-42ca-9b92-fb5c7be7b92fJosh..Davishttp://social.msdn.microsoft.com/Profile/en-US/?user=Josh..DavisHow do you unit test a private function that returns a List<> of private class objects?In code similar to the example below, a unit test must access B and GetBs() through the private accessor for A, as shown in the example unit test.  However, this won't work, because GetBs() returns List&lt;B&gt; and the runtime fails to cast it to List&lt;A_Accessor.B&gt;.  How do I unit test A.GetBs()?<br/> <br/> public class A<br/> {<br/>     private class B<br/>     {<br/>     ...<br/>     }<br/>     <br/>     private static List&lt;B&gt; GetBs()<br/>     {<br/>     ...<br/>     }<br/>     <br/>     ...<br/> }<br/> public class AUnitTest<br/> {<br/>     public void GetBsTest()<br/>     {<br/>         List&lt;A_Accessor.B&gt; = A_Accessor.GetBs();<br/>     }<br/> }Thu, 19 Nov 2009 00:57:02 Z2009-11-19T14:49:57Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ca3ba67b-95d1-4d70-a804-ec554c62fa8bhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ca3ba67b-95d1-4d70-a804-ec554c62fa8bFIF90http://social.msdn.microsoft.com/Profile/en-US/?user=FIF90Unit test succeeds within VS2008 but fails with MSTest.exeHi,  <div><br/></div> <div>I have a unit test which uses the Microsoft Enterprise Library. The test succeeds when launched from VS IDE but fails when launched as a command line.<br/>The exception I get is that a type referenced with the test app.config could not be resolved.</div> <div>I checked that the assembly containing the type is correctly deployed (which is the case and I even a direct reference in the code to this type).</div> <div><br/>The type 'Project.Data.MySql.MySqlDatabase, Project.Data.MySql' cannot be resolved. Please verify the spelling is correct or that the full type name is provided</div> <div> <div>at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)</div> <div>   at System.ComponentModel.TypeConverter.ConvertFrom(Object value)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DbProviderMapping.get_DatabaseType()</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseCustomFactory.CreateObject(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)</div> <div>   at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)</div> <div>   at Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)</div> <div>   at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)</div> <div>   at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)</div> <div>   at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)</div> <div>   at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp[TTypeToBuild](IReadWriteLocator locator, String idToBuild, Object existing, PolicyList[] transientPolicies)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, String id, IConfigurationSource configurationSource)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](String id, IConfigurationSource configurationSource)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.Create(String name)</div> <div>   at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase(String name)</div> </div> <div><br/></div> <div><br/></div> <div>The app.config for the test project :</div> <div> <div>configuration&gt;</div> <div>  &lt;configSections&gt;</div> <div>    &lt;section name=&quot;dataConfiguration&quot; type=&quot;Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; /&gt;</div> <div>  &lt;/configSections&gt;</div> <div>  &lt;dataConfiguration defaultDatabase=&quot;test_database&quot;&gt;</div> <div>    &lt;providerMappings&gt;</div> <div>      &lt;add databaseType=&quot;Project.Data.MySql.MySqlDatabase, Project.Data.MySql&quot; name=&quot;MySql.Data.MySqlClient&quot; /&gt;</div> <div>    &lt;/providerMappings&gt;</div> <div>  &lt;/dataConfiguration&gt;</div> <div>  &lt;connectionStrings&gt;</div> <div>    &lt;add name=&quot;test_database&quot; connectionString=&quot;Persist Security Info=False;Database=test_database;server=localhost;user id=root;password=pw&quot; providerName=&quot;MySql.Data.MySqlClient&quot; /&gt;    </div> <div>  &lt;/connectionStrings&gt;</div> <div>&lt;/configuration&gt;</div> <div><br/></div> <div>Any ideas ?</div> <div><br/></div> <div>Thanks in advance</div> </div>Thu, 19 Nov 2009 10:36:24 Z2009-11-19T10:36:24Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/4310f725-7ca0-4f88-82df-c0cf92428f3ehttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/4310f725-7ca0-4f88-82df-c0cf92428f3eLakhwinder Singhhttp://social.msdn.microsoft.com/Profile/en-US/?user=Lakhwinder%20SinghAssert.AreEqual gives incorrect results<p>Hi,<br/><br/>If you are using Assert.AreEqual to compare doubles with a specified tolerance then this method gives incorrect results in case one of the doubles in NaN.<br/><br/>Example:<br/><span style="font-size:x-small"> <pre lang="x-c#"> [TestMethod] public void TestForMSDN() { double simulatedResult = double.NaN; double expectedResult = 1.0; double _TOLERANCE = 1E-14; Assert.AreEqual(expectedResult, simulatedResult, _TOLERANCE); } </pre> <font size=2> <p> </p> </font></span></p> <p>If you run this test method then no exception is thrown. Interesting thing is that removing tolerance causes the exception to be thrown. This is causing problems in unit testing of our source code because we have to use tolerance.<br/>Does any one know a solution to this problem?<br/><br/>Thanks in advance!<br/>Lakhwinder</p>Tue, 17 Nov 2009 13:57:23 Z2009-11-19T12:19:58Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/25565fe2-5140-4bfe-b3bc-cc2232096a4bhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/25565fe2-5140-4bfe-b3bc-cc2232096a4bMichaelLincolnhttp://social.msdn.microsoft.com/Profile/en-US/?user=MichaelLincolnload test agent issue<p>How to install agent? I am new to this. Are there anything I need to care about?<br/><br/>Thanks in advance.</p>Tue, 17 Nov 2009 16:18:26 Z2009-11-23T06:41:51Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/29705ecf-90e2-4f5e-ba10-85589aa9bb25http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/29705ecf-90e2-4f5e-ba10-85589aa9bb25goraindhttp://social.msdn.microsoft.com/Profile/en-US/?user=goraindHow to run the recorded scripts inside Virtela(VPN)<p class=MsoNormal>Sub:</p> <p class=MsoNormal> </p> <p class=MsoNormal>I have recorded the scripts when i was inside the virtela(VPN).</p> <p class=MsoNormal>I am facing some problem when i tried to run the recorded scripts in VPN.</p> <p class=MsoNormal> </p> <p class=MsoNormal>Please go through the following points:</p> <p class=MsoNormal> </p> <p class=MsoNormal>First I connected my local machine to the remote client machine with VPN (virtela) connection.</p> <p class=MsoNormal>Then I recorded some scripts in VSTS 2008. (Please note here that I did not recorded the transaction while virtela is connecting).</p> <p class=MsoNormal>Then I ran the scripts that I have recorded.</p> <br/> <p class=MsoNormal> </p> <p class=MsoNormal>Issue Noticed:</p> <p class=MsoNormal> </p> <p class=MsoNormal>The script failed and was not able to connect with the remote machine.</p> (Request failed: The remote name could not be resolved: 'URL')<br/> <p class=MsoNormal> </p> My query: <p class=MsoNormal> </p> <p class=MsoNormal>How can we test &amp; run the recorded scripts inside the VPN.</p>Thu, 18 Jun 2009 12:26:29 Z2009-11-19T07:30:30Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/85a2abee-61d4-44c6-9645-b7a47cdadbc9http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/85a2abee-61d4-44c6-9645-b7a47cdadbc9DavidALevinehttp://social.msdn.microsoft.com/Profile/en-US/?user=DavidALevineError running mstest, any ideas on how to fix this?I am writing an automated integration test for an isolated mode VS Shell application (for those that don't know what that is, it's an app that extends Visual Studio shell). <br/><br/>When I run the test from with the VS IDE it runs without errors. When I run the test from the command line usin MSTest I get this error stack trace:<br/><br/>===============================<br/>Run has the following issue(s):<br/>Warning: VS IDE Host Adapter: error shutting down VS IDE: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.<br/>   at EnvDTE._DTE.Quit()<br/>   at Microsoft.VSSDK.Tools.VsIdeHostAdapters.VisualStudioIde.Dispose(Boolean explicitDispose) in f:\dd\vssdk\VSIntegration\Tools\src\IDEHostAdapter\HostAdapter\AgentSide\VisualStudioIde.cs:line 378<br/>   at Microsoft.VSSDK.Tools.VsIdeHostAdapters.VsIdeHostAdapter.CleanupHostSide() in f:\dd\vssdk\VSIntegration\Tools\src\IDEHostAdapter\HostAdapter\AgentSide\VsIdeHostAdapter.cs:line 412<br/>===============================<br/><br/><br/><br/>I invoke MSTest using this command line:<br/><br/>mstest.exe /runconfig:SmokeTests.testrunconfig  /testcontainer:GenericShell_IntegrationTestProject.dll /test:Test_AllPackagesLoaded /test:Test_VerifyProjectAndSolutionDirIsSetToDefaultValue<br/><br/>The SmokeTests.testrunconfig file contains configuration information for the test runner on how to load the shell. <br/><br/>The unit test method itself is decorated with these attributes<br/><span style="font-size:x-small"> <pre>[TestMethod] [HostType( &quot;VS IDE&quot; )] public void Test_AllPackagesLoaded()</pre> <font size=2> <p> </p> </font></span> <p> <p> </p> <br/>The attribute HostType instructs mstest to use the VS IDE as the shell, and in the config file I specified the registry location for my isolated app.<br/><br/><br/>Any ideas why I am seeing this errror? <br/></p>Mon, 18 May 2009 14:44:53 Z2009-11-17T14:06:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0beb09b9-bbd1-4857-b5b2-0805ea6d6426http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/0beb09b9-bbd1-4857-b5b2-0805ea6d6426Awais786http://social.msdn.microsoft.com/Profile/en-US/?user=Awais786Webplugin loads first record onlyjust implemented this code from <a class=headermaintitle id="ctl00___ctl00___ctl00_ctl00_bcr_bth___BlogTitle" href="http://blogs.msdn.com/slumley/default.aspx"><u><font color="#0000ff">Sean Lumley's Blog </font></u></a>. <p>but the problem is my table has 3 records but it runs only once for first row.i dont know why can some one tell me how it will run for all rows existing in table.</p> <p>i m using code as it is.do i need to call Getnextrow in post web section.although i tried that 2 but no result.</p><br>Thu, 25 Jan 2007 04:50:58 Z2009-11-16T19:48:36Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b0e66672-94b5-4f04-a743-a864d50fdf23http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/b0e66672-94b5-4f04-a743-a864d50fdf23BHoppehttp://social.msdn.microsoft.com/Profile/en-US/?user=BHoppeFrom a web test plug-in, how can I stop the remaining iterations from running?I've implemented Sean Lumley's custom data source and its working fine. Now what I want to do with it, is change the access of this custom data source to unique. Right now the code is setup for a Sequential access. In the method GetNextRow(), when it reaches the end, it loops back around.<br/> <br/> So what I've done to make it unique, is instead of looping back around, I have it return null. Then in the plug-in, if I get null returned from the GetNextRow() method, I stop the Web Test like so:<br/> <br/>   e.WebTest.AddCommentToResult(&quot;No more data rows.&quot;);<br/>   e.WebTest.Stop();<br/> <br/> Only problem is, it continues with the test iterations and prints the comment. For example, if I have my web test set to 10 iterations and the CustomDS returns only 1 data row, after the first web test, it still tries to run the remaining 9 tests and each one shows &quot;No more data rows.&quot;.<br/> <br/> Instead, what I want the web test to do in this scenario is after the first web test, stop with a message &quot;No more data rows.&quot; and not even try the remaining 9 tests.<br/> <br/> So basically, from a web test plug-in, how do I stop all remaining iterations from running?Tue, 10 Nov 2009 17:56:01 Z2009-11-16T17:40:39Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/288ee475-07e4-4b6f-926a-1674b10373bdhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/288ee475-07e4-4b6f-926a-1674b10373bdDexterouslyLivehttp://social.msdn.microsoft.com/Profile/en-US/?user=DexterouslyLiveHow to have a unit test not run when is part of an ordered test?I am creating a series of tests but they need to go in order since in one I'm testing writing the file and on the next I'm testing loading the file for example. Now, when I make the ordered test and run it works well, but when I run all the tests in the solution, some fail because it executes the orderedtest and also it executes the unit tests. How can I mark the test that it already belongs to an ordered test and avoid running it outside of the ordered test.<br/><br/><br/>OscarMon, 16 Nov 2009 04:47:51 Z2009-11-16T15:50:04Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/917451af-89c9-4ab4-bd9f-c3935540a90dhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/917451af-89c9-4ab4-bd9f-c3935540a90dAlhambra Eidos Developmenthttp://social.msdn.microsoft.com/Profile/en-US/?user=Alhambra%20Eidos%20Development Error: "Exception has been thrown by the target of an invocation." Hi all,<br/><br/>I use VS 2008 professional, and use Unit tests.<br/><br/>Sometimes, I get the error:  <a href="http://gabriel.lozano-moran.name/blog/PermaLink,guid,1eb7641a-42a3-4080-a2ed-a52972f3e21c.aspx"><span style="color:#e0ad12">Error: &quot;Exception has been thrown by the target of an invocation.&quot;</span></a> <br/><br/><a href="http://peitor.blogspot.com/2009/10/sometimes-it-works-sometimes-not.html">http://peitor.blogspot.com/2009/10/sometimes-it-works-sometimes-not.html</a><br/> <p>What I did and didn’t help:</p> <ul> <li>Start up Visual Studio in safe mode (parameter /SafeMode ) </li> <li>Start up Visual Studio and reset user data (parameter /resetuserdata )</li> </ul> <p>I do this “devenv /safemode”, “Open solution”, “Build”, “Clean”, “Rebuild”, “Cross fingers”, “Run all tests”…  </p> <p>No solution... :'( it's nightmare..</p> <p><br/>Any solutions, please ????</p>Fri, 13 Nov 2009 12:13:07 Z2009-11-20T02:48:19Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/a8d5e191-cf84-4ab1-9934-77c167838dechttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/a8d5e191-cf84-4ab1-9934-77c167838decRaja- .Net Developerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Raja-%20.Net%20DeveloperIssue in using same machine as VSTS CLIENT and as AGENTHi,<br/><br/>When i tried to use VSTS client as agent in rid setup, i am getting error <br/><br/>&quot;Failed to queue test run <a href="mailto:'user@Computer">'user@Computer</a> 2009-01-28 10:06:01': Object of type 'Microsoft.VisualStudio.TestTools.LoadTesting.LoadTestConstantLoadProfile' cannot be converted to type 'Microsoft.VisualStudio.TestTools.WebStress.WebTestLoadProfile'<br/><br/>Actually i am having controller in different machine and having 5 agents in separate machines. it was working fine. But When tried to use machine used as VSTS client as an agent, i stuck up with this errror.<br/><br/>I cheked in all machines. All of them are having VSTS 2008 SP1.<br/><br/><br/>Please help me in fix this issue... Thanks in advance..<br/>Thu, 12 Nov 2009 07:15:24 Z2009-11-13T06:01:05Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1525f2dd-990f-47c1-8a32-4feda6dc381ahttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1525f2dd-990f-47c1-8a32-4feda6dc381asatish padidemhttp://social.msdn.microsoft.com/Profile/en-US/?user=satish%20padidemDoes Web Services unit test requires proxy?<p>Hi</p> <p>Usually when we consume a webservice, we create a proxy and refer the service in the client and we call the web methods, here we need to create the proxy. Like wise when we create unit test for the webservices, is proxy generation is necessary or not</p>Wed, 11 Nov 2009 12:00:28 Z2009-11-12T12:43:37Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ef919ecf-671b-49b5-a324-f091b8628f17http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/ef919ecf-671b-49b5-a324-f091b8628f17Pritam Karmakarhttp://social.msdn.microsoft.com/Profile/en-US/?user=Pritam%20KarmakarHow to create DataSource file outside main test method        [TestInitialize()]<br/>         public void MyTestInitialize()<br/>         {<br/>             XmlTextWriter writer = new XmlTextWriter(&quot;DataFile.xml&quot;, Encoding.UTF8);<br/>             writer.Formatting = Formatting.Indented;<br/>             writer.WriteProcessingInstruction(&quot;xml&quot;, &quot;version='1.0' encoding='utf-8'&quot;);<br/>             writer.WriteStartElement(&quot;TestCases&quot;);<br/>             DirectoryInfo dir = new DirectoryInfo(&quot;Metadata&quot;);<br/>             foreach (FileInfo file in dir.GetFiles())<br/>             {<br/>                 writer.WriteElementString(&quot;TestCase&quot;, file.Name);<br/>             }<br/>             writer.Close();<br/>         }<br/> <br/> <br/> <br/>         [TestMethod()]<br/>         [DeploymentItem(&quot;FunctionalTestsProject\\TestData&quot;)]<br/>         [DataSource(&quot;Microsoft.VisualStudio.TestTools.DataSource.XML&quot;,<br/>                    &quot;|DataDirectory|\\DataFile.xml&quot;,<br/>                    &quot;TestCase&quot;, DataAccessMethod.Sequential)]<br/>         public void MyTestMethod()<br/>         {<br/>             I want to use DataFile created by MyTestInitialize method.<br/>          }<br/> <br/> But here MyTestInitialize method is not executing, as MyTestMethod is trying to make an data connection with DataFile.xml and it get failed. I want to use DataFile.xml file as a data file in my Data Driven Testing and it should be created on run time. Please help me if there is any other workaround for this.<br/> <br/> Regards,<br/> Pritam<br/>Wed, 11 Nov 2009 07:43:34 Z2009-11-18T02:27:51Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1ff55807-beca-4760-98cd-17b2dbc563c2http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1ff55807-beca-4760-98cd-17b2dbc563c2Priscila Santoshttp://social.msdn.microsoft.com/Profile/en-US/?user=Priscila%20SantosVSTS Test Edition 2008 with SharePoint 2008 - upload dialogsHi there.<br/><br/>Having a bit (!) of a problem trying to get a webtest to record a test where a file is uploaded via a browse/save field in SharePoint. Scenario is that a user opens a page, is presented with a Browse button next to a free text entry field. They either click browse and locate the file in their file system, or enter the filename/directory combo in the field. The user then hits Save and the file is uploaded.<br/><br/>Unfortunately it appears that the webtest is not recording this step. Even if the filename and directory are entered manually - rather than via the Browse function - the webtest fails to record this action.<br/><br/>With other automated testing tools it's possible to locate the field name used for the submit function and add code that directly addresses it but not sure how to do this with Visual Studio.<br/><br/>Any suggestions are most welcome.Tue, 10 Nov 2009 00:20:55 Z2009-11-16T04:49:14Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/05cba872-0cbd-48e8-8bbc-c1f85d998973http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/05cba872-0cbd-48e8-8bbc-c1f85d998973disuhttp://social.msdn.microsoft.com/Profile/en-US/?user=disuWebTest VS TE 2008 - file upload problemHi, <div><br/></div> <div>I've got a question. I've recorded a webtest, exported it to C# code, and re-run it.<br/>During one scenario file upload should be done, test ends with &quot;Passed&quot; result, but file is not uploaded.</div> <div>Could you take a look at this code fragment and help me out ??<br/><br/> <div>FormPostHttpBody request23Body = new FormPostHttpBody();</div> <div>            request23Body.FormPostParameters.Add(&quot;__EVENTTARGET&quot;, this.Context[&quot;$HIDDEN1.__EVENTTARGET&quot;].ToString());</div> <div>            request23Body.FormPostParameters.Add(&quot;__EVENTARGUMENT&quot;, this.Context[&quot;$HIDDEN1.__EVENTARGUMENT&quot;].ToString());</div> <div>            request23Body.FormPostParameters.Add(&quot;__LASTFOCUS&quot;, this.Context[&quot;$HIDDEN1.__LASTFOCUS&quot;].ToString());</div> <div>            request23Body.FormPostParameters.Add(&quot;__VIEWSTATE&quot;, this.Context[&quot;$HIDDEN1.__VIEWSTATE&quot;].ToString());</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$optMode&quot;, &quot;VIEW&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$optModuleType&quot;, &quot;0&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$cboDesktopModules&quot;, &quot;-1&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$cboPanes&quot;, &quot;ContentPane&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$txtTitle&quot;, &quot;&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$cboPosition&quot;, &quot;-1&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$cboPermission&quot;, &quot;0&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;IconBar.ascx$cboAlign&quot;, &quot;left&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$dnnSEARCH$txtSearch&quot;, &quot;&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$incentiveControl$ddlIncentive&quot;, &quot;21&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$incentivePeriodControl$cbShowOpenOnly&quot;, &quot;on&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$incentivePeriodControl$ddlIncentivePeriod&quot;, &quot;166&quot;);</div> <div>            request23Body.FormPostParameters.Add(new FileUploadParameter(&quot;dnn$ctr412$Edit$UploadFromCsv1$spreadsheetControl$fuplExcel&quot;, &quot;C:\\Documents and Settings\\My Documents\\Company Check.xlsx&quot;, &quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot;));</div> <div>            </div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$spreadsheetControl$txtComments&quot;, &quot;Automation;&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$spreadsheetControl$btnUpload&quot;, &quot;&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;dnn$ctr412$Edit$UploadFromCsv1$spreadsheetControl$btnUpload&quot;,            this.Context[&quot;$HIDDEN1.__OboutIncFileUploadKey__dnn_ctr412_Edit_UploadFromCsv1_spreadsheetContr&quot; +</div> <div>                    &quot;ol_fileUploadProgress&quot;].ToString());</div> <div>            request23Body.FormPostParameters.Add(&quot;ScrollTop&quot;, &quot;54&quot;);</div> <div>            request23Body.FormPostParameters.Add(&quot;__dnnVariable&quot;, this.Context[&quot;$HIDDEN1.__dnnVariable&quot;].ToString());</div> <div>            request23.Body = request23Body;<br/><br/>Cheers, and thanks in advance !</div> </div>Wed, 04 Nov 2009 14:00:55 Z2009-11-11T03:06:15Zhttp://social.msdn.microsoft.com/Forums/en-US/vststest/thread/dba56778-c82f-40f2-b9fc-fa0a9651fa10http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/dba56778-c82f-40f2-b9fc-fa0a9651fa10Lone VVolfhttp://social.msdn.microsoft.com/Profile/en-US/?user=Lone%20VVolfASP.NET Unit Tests with <location> tag in Web.configBecause of other requirements, we use the &lt;location&gt; tag in our web.config around the &lt;system.web&gt; section.  This seems to have the side-effect of breaking unit testing functionality, as when the unit tests are executed, the process add its own &lt;system.web&gt; section, with a new &lt;httpModules&gt; subsection, which throws an error when trying to access the site.  Is this a known issue?  Is there a workaround that lets us keep the &lt;location&gt; tag?Tue, 10 Nov 2009 12:25:28 Z2009-11-10T12:25:29Z