views:

100

answers:

1

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!

A: 

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.

technophile
Yeah - I thought of that, but I was able to load the sln file from the CI build location and run everything without error, so it seems all the dependencies are there. Plus, the tests that are failing are not unique in terms of any dependencies. The trx file is very helpful, though - thanks!
sydneyos
It could also be something about running in a service context with no interactive session attached, then. We've seen that when running some kinds of Telerik Web UI tests, for example.
technophile