Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSTest is removing Test Results when VS2013 is running as Administrator

I know that sounds strange but that is how it is)

I'm using MSTest to run my unit tests. Using VS2013 + ReSharper 8.1 + some dll projects in C#. I'm calling some API functions, that is why I need VS to running as Administrator or those calls will fail.

The problem is:

For some reason folder TestResults is empty. While tests are running and not completed, I can see a new folder (User_Comp YYYY-mm-dd HH-MM-ss) created inside, with all test outputs, but once tests are completed this folder is deleted, so TestResults are empty.

I've checked my project Options->Web Performance Test Tools->Test Execution->Limit number of old Test Results is set to 25. I've tried to disable ReSharper UnitTesting + disabled support for MSTests, NUnit and JS, but problem still exists.

When VS is started under normal account (not Administrator)

In this case folder "TestResults\User_Comp YYYY-mm-dd HH-MM-ss" is not deleted after test. Of course in this case some of my tests are failing.

I've set full access for each user to folder "TestResults" but still results are removed.

Looks that VS is using 0 as limit for Test Results. Did anyone face this problem?

like image 452
mkonvisar Avatar asked Feb 16 '14 13:02

mkonvisar


People also ask

How do I run a MSTest unit test?

To run MSTest unit tests, specify the full path to the MSTest executable (mstest.exe) in the Unit Testing Options dialog. To call this dialog directly from the editor, right-click somewhere in the editor and then click Options.

Is MSTest a testing framework?

MSTest framework for Selenium automated testing is the default test framework that comes along with Visual Studio.

How do I run all test cases in Visual Studio?

To run all the tests in a default group, choose the Run icon and then choose the group on the menu. Select the individual tests that you want to run, open the right-click menu for a selected test and then choose Run Selected Tests (or press Ctrl + R, T).

How do I enable test in Visual Studio?

To enable Live Unit Testing, select Test > Live Unit Testing > Start from the top-level Visual Studio menu.


1 Answers

Test results are removed when all tests pass. If any is failed, results are not removed.

like image 126
mkonvisar Avatar answered Oct 17 '22 10:10

mkonvisar