Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Visual Studio Team Services unit tests

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?

like image 775
Sean Avatar asked Feb 05 '14 10:02

Sean


People also ask

What is difference between debugging and Unit Testing?

Testing is the process to find bugs and errors. Debugging is the process to correct the bugs found during testing. It is the process to identify the failure of implemented code. It is the process to give the absolution to code failure.

How do you debug a test case?

To debug a failed test case you should: check that the input data is correct (open the test case to view and/or update the base level attribute values) check that the expected results are correct (in the Test Report, click on the expected result to view and/or update the expected results for that attribute)

How do you debug test cases in Visual Studio react?

Debugging Tests in Chrome​Select inspect on your process and a breakpoint will be set at the first line of the react script (this is done to give you time to open the developer tools and to prevent Jest from executing before you have time to do so).


1 Answers

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.

like image 196
Joe Wilson Avatar answered Oct 08 '22 07:10

Joe Wilson