I have added a "Unit Test Library" project to my solution containing a simple test class:
namespace Metro_test
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.Equals(0, 1);
}
}
}
But I am unable to make the test show up in the text explorer window. I have tried cleaning/rebuilding the solution, removing/re-adding references to MSTest and editing the .csproj file to make sure the project is marked as a test-project.
The whole solution is under source control and my colleague (working with the same code) is having no problem running the test.
Any ideas?
To enable Live Unit Testing, select Test > Live Unit Testing > Start from the top-level Visual Studio menu.
You just need to hover your mouse at the bottom of Test Explorer and drag it up. You can see Test Details summary below of your test regardless of Run or Debug mode.
Select the test project in Solution Explorer. On the Project menu, select Add Reference. In Reference Manager, select the Solution node under Projects. Select the code project you want to test, and then select OK.
Try adding a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework, which can be found in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies
Then also make sure that you are using the assemblies that you added reference to.
using Microsoft.VisualStudio.TestTools.UnitTesting;
and remove the old
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
EDIT
You could also just update your visual studio to update 3, which should solve this problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With