简体   繁体   中英

Unit Tests show in Test Explorer but won't run in Visual Studio (2013 & 2015)

I have several ms unit test projects in my solution, when I go to Test Explorer all the unit test projects show up in the list:

带有测试项目的Test Explorer及其计数

When I hit "Run All" there is only one project that is discovered and run.

选择“全部运行”的输出窗口

I can execute the other projects by selecting them individually and hitting "Run Selected Tests" but the Test Projects will not execute together automatically.

These tests use to run fine in the solution but have stopped within the last month or so running when "Run All" is used.

Thanks for any help!

I am using Visual Studio 2015 and faced the same problem few days back - when I clicked on 'Run All', all my Coded UI Tests ran but not my Unit/Integration Tests. Looking at your screenshot, it seems like you are facing the same problem where none of your 264 Unit Tests ran.

In my case -- Clearing my Temp files, resolved the problem for me.

Go to your START Menu and type %temp%

Once your Temp folder opens up, just delete all the contents.

Now go to your Visual Studio IDE, and from your Test Explorer window - click on 'Run All'

You should now see all the test projects(Coded UI, Unit Tests) being identified and executed.

Let me know if this does not solve your problem.

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