Unit tests in VS 2015 versus VS2013

2019-09-17 07:34发布

问题:

So I've got a solution that, across the various projects, have 16,000 unit tests that all passed in Visual Studio 2013. After having upgraded to 2015, though, when I choose to 'run all' tests, between 18 and 20 will fail (and the most I've seen is 35). It is always at least the same 18, but without any changes to the code, sometimes more fail. The 18 and others don't share almost any common elements that would make rooting out the cause easily apparent (at least to me).

Now, when I select the 20 or so that failed the run all, and choose "Run selected Tests" from the right-click menu, only 6 fail and the rest pass (the 6 did pass everytime in VS2013).

Can anyone point me at least in a direction to figure out why this is happening? As far as I can tell, vstest remained the same between the versions. If relevant, the entire code base is written in C#, and I'll be happy to provide any more details as necessary.