5
votes

In my team, Visual Studio Team Services (formerly Visual Studio Online / Team Foundation Service) is configured to automatically build the solution and run all the unit tests of the solution, at each check-in.

There is a test that succeeds in my local Visual Studio but not in Team Services: how can i do to have more information about the test that failed? Is it possible to manually run the test in Team Services?

1
Have you opened the test results and downloaded them? Debugging non-deterministic tests that work locally and fail on build servers (local or online) is a pain :). Maybe you can add some logging. - DaveShaw
Does the test use any dependencies? - Andrew Clear
In the Build/Log section of VS online there is a "Download drop as zip" button, but it made me download the whole solution and no information about the tests. Yes, the test use dependencies. - Sean
Are the dependencies the tests use available to the hosted build machine? - Andrew Clear
Yes. I found the solution: the test works locally, but not if I launch the entire set of tests. So I could understand what was the error. Thank you. - Sean

1 Answers

6
votes

I had the same issue with intermittently failing tests. Visual Studio Team Services says the tests failed, but not why - not on the build's Summary, Log, or Diagnostics tabs, and not when you "Download all logs as zip". However, you can get this information inside Visual Studio.

In Visual Studio, go to the menu View > Team Explorer. Click Builds. You should see a list of recent builds. Double click the failed build. You can now expand the failing tests and see why they failed.