Visual Studio Test Explorer window will not open
Asked Answered
I

9

44

For some reason I can't open the test explorer window in Visual Studio 2012. I click Test->Windows->Test Explorer and nothing happens...

This problem may have been caused by recently uninstalling DotCover. I did this because my licence expired and I was having issues running tests without it (context menus weren't working).

Any suggestions or advice much appreciated!

Thanks.

Inexpiable answered 12/7, 2013 at 10:36 Comment(3)
Hmm, the plot thickens... If I set a break point in a test and then right-click->debug tests then the test explorer window appears until the test completes, and then it disappears again. And pinning it, unpinning it, docking/undocking it does not keep it in view!Inexpiable
I am seeing this behavior too. I did not uninstall anything. I have removed all my .suo files. I really do not want to go the reset settings route (painful). Any other ideas? I am going to post this problem on connect.microsoft.com site to see if the company itself will respond.Matelot
Sorry but I've got no suggestions other than the heavy-handed 'reset all' method below. It wasn't too much of a big deal though, just reverting my tab and newline settings and some code highlighting colour choices... You may have more customisations though!Inexpiable
P
41

In VS2012, Test Explorer has a bug in that the window doesn't get focus when you click Test > Windows > Test Explorer. Instead, the menu item has no effect unless the window was complete hidden, in which case it is displayed.

The bug means that if Test Explorer is collapsed with Auto Hide, the menu item does nothing. Check that Test Explorer isn't in an auto-hide tab somewhere off to the left or right (i.e. in a tab with text written vertically, like Server Explorer and Toolbox are by default).

Update: The bug is fixed in VS2013.

Promisee answered 25/10, 2013 at 14:52 Comment(3)
I've actually seen this problem since - good suggestion! I've beeb trying to find text explorer and it's just been hidden amongst a million tabs. Silly I know, but quite often happens when you drag the window around and it snaps back into VS without you realising.Inexpiable
@WheretheresaWill: I had a similar experience when I was trying to demonstrate the concept of unit testing to a client who was new to automated unit tests in general and test managers in particular. I wanted to pop open Test Explorer and show him how easy it was to start the tests and see the pretty green check marks. Instead it was, "Take a look at this. Oh, never mind." It was getting to that bottom of the problem that lead me to this SO question.Promisee
encountered this problem in VS2013 (Window->Reset Window Layout fixed the problem for me)Vaulting
O
17

Window -> Reset Window Layout fixed the problem for me.

Oceangoing answered 11/11, 2013 at 3:38 Comment(2)
This got me in the direction of my silly problem of having my laptop opened (enabling an extra screen) while using my dock with other monitors. The test window was going to my laptop screen which wasn't in my line of sight. Thanks!Microparasite
It's possible the accepted answer is correct STILL in VS 2022, but I could not find the Test Explorer ANYWHERE!!!! Reset Window Layout absolutely worked! Where the window came back from is still a mystery, but it's back. I would agree with anyone who is upset with having to do this if they have a very customized window layout, but at least it works, when nothing else would.Veedis
L
13

For me the fix was:

  • Focus on the test window by Test > Windows > TestExplorer
  • Using Win+Left / Right to move the window onto an active screen

    >    ┌┬┐
    > Win├┼┤ + Left or Right key
    >    └┴┘
    

The same worked for the ReSharper Unit Test Sessions window.

Lytic answered 23/6, 2015 at 14:16 Comment(4)
It's 2019 ( 4 yrs later ). I just wasted hours of my time debugging until I tried this.Jesicajeske
@Jesicajeske you're the second person in the last couple of weeks who has up-voted this ... looks like there's a regression in VS2019 ... I'll ping MSLytic
logged at developercommunity.visualstudio.com/content/problem/795674/…Lytic
I'm on VS2022 and just tried to move drag the Test Explorer window to a dockable tab - and the window disappeared! Your solution worked for me too!Stabile
D
3

Found this solution here, which is the only thing that worked for me.

Delete all files from this folder: user\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

Drugge answered 17/10, 2014 at 22:0 Comment(0)
D
2

This worked for me (VS2015):

  1. Close VS instances.

  2. Delete component model cache folder %LocalAppData%\Microsoft\VisualStudio{Version/Instance}\ComponentModelCache. This wipes out the MEF cache.

  3. Run devenv /setup /ResetSkipPkgs. Reference: http://msdn.microsoft.com/en-US/library/ex6a2fad(v=VS.80).aspx

  4. Start VS again and see if the problem goes away.

Source

Diannadianne answered 18/8, 2015 at 22:1 Comment(1)
Still works with VS 2022Garretson
I
1

As a brutal fix I actually decided to reset all VS settings (not ideal as you lose all your custom settings like formatting and debugging preferences!).

To do this open up a cmd line and cd to the VS directory (mine was C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE) and type:

devenv.exe /ResetSettings

Hope this helps someone in the future...

Inexpiable answered 12/7, 2013 at 11:6 Comment(0)
S
1

I had the same problem; turned out it was the Corbis Route add-in that was causing an error in combination with the 'I hate regions' add-on, which caused the Test Window to throw an exception.

After removing both add-ins the window reappeared again after a reset of the VS 2013 window layout. (Windows > Reset Window Layout)

Sheaves answered 27/2, 2014 at 8:4 Comment(0)
S
0

A short-cut for those who have lost Test Explorer somewhere !

  1. Ctrl + Q (for quick launch)
  2. You would notice the focus on a small text box on the top right of VS.
  3. Type in "Test Explorer" and select the option that says Test> Windows> Test Explorer
Seedman answered 15/5, 2016 at 2:24 Comment(0)
V
0

I have VS 2015. I couldn't find my Test Explorer, even with Test->Windows->Test Explorer. I finally figured it was showing on the left instead of the right.

Varian answered 25/5, 2016 at 17:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.