Testfx: TestResults not cleaned up

Created on 1 May 2017  路  5Comments  路  Source: microsoft/testfx

Description

Once any test fails, even if it is fixed, every subsequent run creates a subfolder in TestResults. It contains no files. These folders never get automatically deleted.

Edit: After many more runs, it appears that sometimes the folders are deleted and sometimes not. Race condition involving file locking?

Steps to reproduce

  1. Create a Test Project
  2. Put Assert.Fail() into TestMethod1()
  3. Click "Run All" in the Test Explorer. It will fail.
  4. Remove Assert.Fail()
  5. Click "Run All" several times. It will succeed.

Expected behavior

The TestResults folder does not exist or is empty.

Actual behavior

In TestResults, there is a subfolder for each run, even the successful ones. These folders are empty except for In/Out folders, which are empty.

Environment

Windows 10
Visual Studio 2017 Community 15.1 (26403.7)
MSTest.TestAdapter 1.1.17
MSTest.TestFramework 1.1.17

bug wontfix

All 5 comments

This is benign - we can live with this.

I don't understand why this was closed. It may be "benign" but that doesn't mean it's good to put a messy TestResults folder into the root of any solution containing a test project. It should at least be an accepted low priority bug.

We abandoned MSTest because of this.

@pvlakshm I have 3k empty folders there 馃憥 This definitely isn't normal. Why do you even need a feature that generates empty directories?

You might want to take a look a this - I've found a workaround.

Was this page helpful?
0 / 5 - 0 ratings