开发者

Cleaning ReSharper's TestResults files?

开发者 https://www.devze.com 2022-12-18 16:51 出处:网络
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:

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 Execut开发者_运维技巧ion > 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?


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.


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"
0

精彩评论

暂无评论...
验证码 换一张
取 消