lance
lance

Reputation: 16382

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?

Upvotes: 9

Views: 2235

Answers (2)

EMP
EMP

Reputation: 62031

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"

Upvotes: 5

Mark Seemann
Mark Seemann

Reputation: 233505

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.

Upvotes: 7

Related Questions