Konzy262
Konzy262

Reputation: 3107

Visual Studio Test Explorer window not refreshing

Multiple times throughout the day, my Test Explorer window in Visual Studio 2017 is locking up. Whilst it doesn't crash VS, when affected I can't run any tests as none of the options are available when right clicking on a test....

enter image description here

I have a mixture of NUnit and SpecFlow+ tests in different projects. Cleaning and rebuilding the solution doesn't work, the test explorer window doesn't change. Attempting to use the 'NUnit test (click to run)' option also does nothing.

The only way to resolve this issue is to restart Visual Studio which is highly frustrating.

Anyone know what the issue could be?

Thanks

Upvotes: 5

Views: 7298

Answers (3)

Adam Seabridge
Adam Seabridge

Reputation: 2044

I had the same issue with xUnit tests in VS2019, in the end the only thing that refreshed the window was deleting the following (no idea which one fixed it):

  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root
  • C:\Users\ [username]\AppData\Local\Microsoft\WebsiteCache
  • C:\Users\ [username]\AppData\Local\Temp -> all folder starting with 'vs'
  • C:\Users\ [username]\AppData\Local\Microsoft\VisualStudio\16.0_2103f9d0\Extensions\ -> all cache files here

Upvotes: 0

Mohammed Hameed
Mohammed Hameed

Reputation: 93

I was also facing the same issue, as a workaround I Unloaded my test project and then Reloaded back; then ran the test again. This time it refreshed the Test explorer :)

My VS version: VS Professional 2019 Version 16.9.6.

Note: I had to do this to all my Test projects.

Upvotes: 5

Anand
Anand

Reputation: 1939

I have had multiple issues with specflow+. In the end I uninstalled specflow+ and went with normal specflow. This solved many issues for me, including this issue. Hopefully it will work for you as well.

Upvotes: 1

Related Questions