Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test discovery fails to find any tests, because of deleted temporary files #514

Closed
kkostrzewa opened this issue Jun 8, 2018 · 1 comment
Labels
closed:done External Tracked here, but must be fixed in external tool

Comments

@kkostrzewa
Copy link

NUnit3TestAdapter version 3.9.0
Visual Studio 2015 version 14.0.25431.01 Update 3

It appears that NUnit3TestAdapter uses %temp%\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.9.0 to store some test adapter .dlls.

My Windows 10 came preconfigured (Settings / System / Storage / Change how we free up space automatically) to "Delete temporary files that my apps aren't using".

I believe this deleted files under %temp%\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.9.0 but not the %temp%\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.9.0 directory, which caused test discovery to fail to find any tests.

Deleting the %temp%\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.9.0 directory and reloading the .sln causes the temp location to get filled out again, which causes test discovery to work.

@OsirisTerje
Copy link
Member

OsirisTerje commented Jun 8, 2018

Hi! It is not the adapter that uses that temporary folder, it is the Visual Studio test system that places the adapter dll's there. The issue you mention is known, but perhaps not communicated well enough, and I believe it has been fixed in latest version of Visual Studio (but will do an extra check about that).
I have posted this blogpost earlier about this: http://hermit.no/how-to-resolve-cases-of-visual-studio-no-tests-appearing/ (See Crash Fixes at the bottom there), and is also documented in the #261 issue.
The cure is, as you have found yourself, is to simply delete the cache folder in the temp directory. The IFix tool can also do this for you doing: IFix vstestcache -f .
On my machine it looks now like:
bilde

(Update)
I have got it confirmed that this issue was resolved in Visual Studio 2017, Update 15.7

@OsirisTerje OsirisTerje added closed:done External Tracked here, but must be fixed in external tool labels Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:done External Tracked here, but must be fixed in external tool
Projects
None yet
Development

No branches or pull requests

2 participants