question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestResults not cleaned up

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
pvlakshmcommented, Nov 2, 2017

This is benign - we can live with this.

1reaction
he-devcommented, Nov 18, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS2012: Clear the test results in Test Explorer when re- ...
Actually, there is a way - clean and then rebuild your solution. Previous test run results will clear right up.
Read more >
Visual Studio Tip O' the Day: Delete your test results
My solution was to simply open Windows Explorer, navigate to the TestResults folder, and delete all of the subfolders within.
Read more >
How do I clean colcon test results?
Is there some sort of way to clean out all test results without outright deleting my build folder?
Read more >
What to do when blood test results are not quite “normal”
If you've ever looked through your bloodwork results, you may have noticed that some of your results are barely within the normal range—or ......
Read more >
Review test results - Azure Pipelines
Find out about automated testing that proves your code to be maintainable, understandable, and functioning without repetitive manual testing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found