Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cleaning ReSharper's TestResults files?

I'm using ReSharper 4.5 to execute my MSTest unit tests in VS2008. With each test run, it's creating files in this path:

testProjectFolder\bin\Debug\TestResults

How can I clean/delete those files from within Visual Studio?

If I can't delete them from within Visual Studio, when can I expect them to be removed?

I see Visual Studio's Tools > Options > Test Tools > Test Execution > Test Results Management > Limit number of old Test Results to..., and VS seems to honor it when you're using the stock VS test runner. ReSharper doesn't seem to honor that setting, and I don't see a similar setting in ReSharper. So, ReSharper's TestResults files just keep adding up on the disk?

like image 930
lance Avatar asked Jan 26 '10 21:01

lance


2 Answers

I find the simplest way is to just add the following post-build step to my test project:

IF EXIST "$(TargetDir)TestResults" RD /S/Q "$(TargetDir)TestResults"
like image 35
EMP Avatar answered Sep 28 '22 18:09

EMP


The TestResults folder in itself is not an artifact of ReSharper, but rather of MSTest itself.

Here's a blog post that describes one way of managing it, and here's the associated code snippet.

like image 54
Mark Seemann Avatar answered Sep 28 '22 17:09

Mark Seemann