vs-unit-testing-framework

Resharper 8.1 Test Runner slowing down Visual Studio Text Editing

假装没事ソ 提交于 2019-12-01 03:23:11
I've got a fairly small C# solution with about 5 projects in it. I am using Visual Studio 2012 with Update 4, and Resharper 8.1 (build 8.1.23.546). It's on an I7 with an SSD and 16GB RAM, with oodles of disk space. Performance on this machine is fantastic for everything else. I have R# set to be my unit test runner, and I've noticed that as soon as I run any unit tests (one or many, pass or fail, makes no difference), the Visual Studio text editor becomes almost unusable. Typing into the editor window suffers such extreme lag (up to 1 second between keystrokes) that it completely breaks down

DeploymentItem not deploying files

流过昼夜 提交于 2019-11-30 14:38:46
问题 I am using MS unit testing framework for testing my C# library. I have to open a file which I'm deploying using DeploymentItem attribute . But it is not deploying file to the Test deployment directory. In my Unit-test project, I created a folder TestFile in this folder there are multiple files, lets say a.txt, b.txt. Now in my Unit-test class I added DeploymentItem attribute. But file is not being copied. Here is my code. [TestClass] [DeploymentItem("TestFile")] public class CustomLibraryTest

Prevent Visual Studio 2010 from starting ASP.net development server

泄露秘密 提交于 2019-11-30 08:14:13
问题 I have 3 projects in my solution. Whenever I attempt to debug a unit test in any of the projects, VS2010 starts 3 (1 for each project) ASP.net development servers. The issue I have is that VS2010 takes a long time starting these development servers and as a result I spend a lot of time waiting whilst I attempt to debug unit tests. I am not sure why VS2010 does this... Is there a valid reason? Is there a way to prevent these development servers from starting when debugging unit tests? 回答1: Not

Visual Studio - suddenly cannot debug tests

与世无争的帅哥 提交于 2019-11-30 01:14:22
I'm not sure what I did, but all of a sudden, my Visual Studio 2012 will not debug any tests. If I select a test from the Test Explorer and tell it to run, it simply outputs this in the Test Output window: > ------ Discover test started ------ > ========== Discover test finished: 29 found (0:00:01.3371755) ========== > ------ Run test started ------ Process with an Id of -1 is not running. > ========== Run test finished: 0 run (0:00:01.4711861) ========== what the heck does that mean?! After doing this a few times, the error changed to: The Operation was Cancelled which I sure didn't do. It's

MSTest: No tests are run because no tests are loaded or the selected tests are disabled

时间秒杀一切 提交于 2019-11-29 23:28:17
I have a c# solution with the following structure: mySolution myProject myProject.MSTests References Microsoft.VisualStudio.QualityTools.UnitTestFramework sutMSTests.cs sutMSTests.cs: [TestClass()] public class sutMSTests { [TestMethod] public void MyTest0() { Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(4, 2 + 2); } } When I try to run the tests via Test, Run, All Tests In Solution, I get the following on the VS2008 status line: No tests are run because no tests are loaded or the selected tests are disabled. Test, Windows, Test View shows no tests. Note: I created the tests

MSTest cannot find the assembly

夙愿已清 提交于 2019-11-29 13:19:35
I was using MSTest and i use command mstest /testsettings:local.Testsetting /testcontainer:folder\obj\Debug\test.dll and this is the output, Run has the following issue(s): Warning: Test Run deployment issue: The assembly or module 'Microsoft.Practices. Prism' directly or indirectly referenced by the test container 'test.dll' was not found. Warning: Test Run deployment issue: The assembly or module 'Project.Common.dll' directly or indirectly referenced by the test container 'test.dll' was not found. Warning: Test Run deployment issue: The assembly or module 'Project.Infrastructure.dll'

Prevent Visual Studio 2010 from starting ASP.net development server

蹲街弑〆低调 提交于 2019-11-29 06:14:27
I have 3 projects in my solution. Whenever I attempt to debug a unit test in any of the projects, VS2010 starts 3 (1 for each project) ASP.net development servers. The issue I have is that VS2010 takes a long time starting these development servers and as a result I spend a lot of time waiting whilst I attempt to debug unit tests. I am not sure why VS2010 does this... Is there a valid reason? Is there a way to prevent these development servers from starting when debugging unit tests? JohnD Not sure why it does this by default, but if your question is really "how do I turn this off", then do

Visual Studio - suddenly cannot debug tests

流过昼夜 提交于 2019-11-28 22:00:03
问题 I'm not sure what I did, but all of a sudden, my Visual Studio 2012 will not debug any tests. If I select a test from the Test Explorer and tell it to run, it simply outputs this in the Test Output window: > ------ Discover test started ------ > ========== Discover test finished: 29 found (0:00:01.3371755) ========== > ------ Run test started ------ Process with an Id of -1 is not running. > ========== Run test finished: 0 run (0:00:01.4711861) ========== what the heck does that mean?! After

MSTest: No tests are run because no tests are loaded or the selected tests are disabled

女生的网名这么多〃 提交于 2019-11-28 21:21:02
问题 I have a c# solution with the following structure: mySolution myProject myProject.MSTests References Microsoft.VisualStudio.QualityTools.UnitTestFramework sutMSTests.cs sutMSTests.cs: [TestClass()] public class sutMSTests { [TestMethod] public void MyTest0() { Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(4, 2 + 2); } } When I try to run the tests via Test, Run, All Tests In Solution, I get the following on the VS2008 status line: No tests are run because no tests are loaded or

How to access TestRunParameters within RunSettings file

六眼飞鱼酱① 提交于 2019-11-28 17:26:58
问题 Reading through https://msdn.microsoft.com/en-us/library/jj635153.aspx I have created a .RunSettings files with a few parameters similar to the example: <TestRunParameters> <Parameter name="webAppUrl" value="http://localhost" /> <Parameter name="webAppUserName" value="Admin" /> <Parameter name="webAppPassword" value="Password" /> </TestRunParameters> I plan on having a .RunSettings file for each of our environments with appropriate URLs and credentials for running a CodedUI test on the