简体   繁体   中英

VS11 Dev Preview Unit Test Explorer doesn’t show Unit Tests

I wonder has anyone come across with this issue where the MSTest Unit Test doesn't show up in the new Unit Test Explorer.

I'm running Windows 7 (32bit). I downloaded the VS11 Developer Preview from the link below. http://www.microsoft.com/download/en/details.aspx?id=27543

I created a sample C# Console App, and add the Test Library from the MSTest project template. Then I created a sample Unit Test, and rebuild the solution. When I open the Test Explorer (View->OtherWindows->UnitTest Explorer) I do not see any tests loaded.

I only see a message saying… “No test discovered. Please build your project and ensure the appropriate test framework adapter is installed”.

I assume the MSTest adapter is automatically installed. If not I'm not even sure how to install an adapter.

I could be missing something here but I cannot figure it out. Has anyone experiencing this issue?

Found out that at this only works with Windows8. (At this stage) More info http://jerssoft.blogspot.com/2011/09/vs11-unit-test-explorer-acercamientos.html#more (you need to translate to English)

" Of course, all this work the right way if we have properly configured and in the final version , since according to understand, if you want to try this plugin, you need to be working with Windows 8 :) "

http://geekswithblogs.net/lbugnion/archive/2011/09/24/running-unit-tests-in-visual-studio-2011-and-windows-8.aspx

If you are using VS Ultimate version of VS 11 developer preview, then it support MStest based unittesting for Windows7 style apps/projects if that is what you were trying out. It is possible that you are hitting a bug. Will it possible for you to share your repro steps?

Thanks, Abhishek Agrawal Program Manager, Visual Studio, Microsoft Corp

This wasn't working for me using Visual Studio Express 2012 Web RC, but I got it going eventually.

I added the reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework which I found in C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\PublicAssemblies

I made sure this was set to Copy Local but probably not required.

Then I tried cleaning and rebuilding but with no effect. I made sure I didn't have any testsettings selected (Test Menu > Test Settings > Untick the testrunconfig if selected), then changed my Test > Test Settings > Default Processor Architecture to x64 (my machine is x64).

Then I cleaned and rebuilt the solution and my Test Explorer was populated when I click Run All.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM