Some unit tests fail in automated Team Build task
I have an odd situation. I have a suite of unit tests that pass on my dev machine. They pass on the build machine if run from visual studio. But 5 of them reliably fail during the automated build. There is nothing noteworthy about the ones that fail that I can see (and I've stared at them a long time). Anyone seen anything like this? Is there a way to see the test output in the Team Build log? All I get is Passed开发者_高级运维 or Failed messages, but not the Assert message.
Thanks!
You should be able to get the actual .trx file from either the build result screen or from the drop location. You can open that in Visual Studio and see the error message, stack trace, etc.
One possibility is that it's depending on certain file paths or dependent libraries that aren't there in the CI build; Team Build will only copy libraries that are either referenced by your test assemblies or are explicitly labeled as Deployment Items, so if you do any reflection loading or other dynamic type loading, that could be a cause.
精彩评论