Why does my test project not appear in the test explorer

I am using VS2012 (v110) I am creating a simple dll application with only 1 function and a test project to test the dll function. I installed both projects to debug builds for win32 and tried to clean and rebuild both projects, but I don’t see any test running in the windows of the test explorer.

I also refer to the Dll project in the test project already.

Why is nothing displayed in Test Explorer windows?

+4
source share
4 answers

In fact, MSTest does not work with simple class library projects. You will need to create a unit test project and place your tests there.

If you use other testing environments, such as NUnit, then you can use the library of simple classes. You can then use NUnit to run tests outside VS, or use tools like ReSharper to run these tests inside VS

+3
source

It seems you used some test framework, others that MSTest. If you want to use Test Explorer for some other frameworks, you must also install its runner. for example, NUnit needs to install its test adapter like the extension in VS.NET

see here for more .

+2
source

You should be able to modify the existing class library project so that mstest recognizes it as a test project by modifying ProjectTypeGuids in the .csproj file as described in this answer How do I get VS2010 to recognize my mstests created by SpecFlow? (Look for an answer that lists specific hints, rather than a currently accepted answer that says just create a new project.)

0
source

You had a simulated problem. I decided. I am adding a test project to my VS 2012 solution and the tests did not appear in Test Explorer. The problem was that the test project was located in the IIS inetpub \ wwwroot folder, which did not have Windows user rights to modify it. Adding a solutions folder Windows user rights to change the problem. Tests are now visible in the test conductor and can be debugged. I assume that the vstest.discoveryengine.exe process running by a Windows user did not have access to test project files.

0
source

Source: https://habr.com/ru/post/1479240/


All Articles