4

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

Konzy262
  • 2,747
  • 6
  • 42
  • 71
  • Is there any output in the test output window? – Andreas Willich Jan 15 '18 at 18:59
  • Hi Andreas. When this occurs nothing is logged to either the 'Test Results' window or the 'Output' -> 'Tests' window after a rebuild. The build output is shown as normal after rebuilding. The only workaround I've found when this occurs is to close Visual Studio and delete the contents of the %temp% folder and then restart – Konzy262 Jan 16 '18 at 10:29
  • You probably only need to clean the %temp%\VisualStudioTestExplorerExtensions folder, as VisualStudio copies the test adapters there. This has sometimes problems and "destroys" the adapter there. – Andreas Willich Jan 16 '18 at 11:20
  • My experience is that is takes a while before the list is repopulated with the right information. Sometimes even minutes. – Rob Vermeulen Jan 27 '20 at 10:21

3 Answers3

3

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.

Mohammed Hameed
  • 73
  • 1
  • 10
1

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.

Anand
  • 1,899
  • 1
  • 13
  • 23
  • Sorry to hear that you had problems with SpecFlow+, as I am one of the developers of it. Did you open an issue on http://specflow.org/specflow-support/ for your problems? – Andreas Willich Jan 16 '18 at 11:18
0

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
Adam Seabridge
  • 1,909
  • 1
  • 20
  • 27