Multiple test project on Visual studio
-
2012年3月1日 11:37
Hi, I have created projects in solution like this
MySolution
Solution Items (This created when I added test project in solution) (includes Local.testsettings, Mysolution.vsmdi, TraceAndTestImpact.testsettings)
+Project1
+Project1.Test
+Project2
When I add new test project in solution, Project2.Tests for Project2, I can not run the this Project2.Test project. When I click run tests button, Project1 test projects are running.
Is this is a bug?
全部回复
-
2012年3月2日 10:05版主
Hi youtubeline,
Thank you for posting in the MSDN forum.
Can you give us a screen shot about the “run tests button” where you click?
I try to repro this project, open Test-> windows->Test View, select the Project2.Tests, and then click Run Selection, it works normally. Can you check it with my steps?
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
- 已标记为答案 Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator 2012年3月9日 1:41
-
2012年3月7日 5:59版主
Hi youtubeline,
Any update? Could you get useful information from my reply?
Would you mind letting us know the result of the suggestion?
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
2013年4月10日 17:03
I've seen exactly the same problem in VS2012. I have a Unit Test project that works. I add another Unit Test project and none of the tests in that project can be run. The .csproj file is clearly a unit test file, according to the instructions in http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/2192fac0-0de7-45c6-872a-2be49e95ce2c/ The icon of the new project didn't even include the Unit Test project icon (which is probably a minor bug).
The problem was that the test project didn't include any valid tests. I thought that the test was valid, but they are only valid if they follow a specific signature:
[TestClass] public class SomethingTests { [TestMethod] public void testSomething() { ... } }I had made my test async. That's not allowed.

