For some reason, the DeploymentEnabled
flag is not taken into account when I run my tests from an orderedtest
; i.e., the DirectoryPath
is as if DeploymentEnabled
was True
, although I explicitly set it to False
in the .runsettings
file.
My question seems to be closely related to this one although no solution was found there.
I run VS Enterprise 2015.
Any clue?
My understanding is that, by design, ordered tests need files to be deployed to work.
Hence, I added similar code everywhere needed in my unit test classes:
<TestMethod()>
<DeploymentItem("Test Files\MyInputFile.txt", "Test Files")>
Public Sub ...
In my .runsettings file I set DeployementEnabled
to True
, and it works. The downside being I had many unit tests to update with DeploymentItem
...
In an ordered test, each test is self-contained and independent. So the environment state is not retained between each test that is run.
I guess that answers the question.