Check the Unit Test Status Easily and Effectively – Test Status Indicator in Visual Studio 2013 Preview

In the previous tip you have seen how the code reference indicator help us to find the code reference easily. Visual Studio 2013 enables the similar features for Unit Tests as well.  Test Case Indicator ( Part of Code Information Indicator), indicates the status of the unit test with actual methods as well as in test methods.

As shown in the following image, the Index Action result has a Unit Test written, but which is not executed as of now.

image

image

You can click on that status icon in the indicator and take the necessary action.   You can either run a single test method or run all test method which is associated with the current method.

image

In the test method, the status icon indicates if the status of the unit test passed or failed.  For failed test cases you can trace down to actual fail reason from the inbuilt stack track information.

image image

image

Even though this features looks very small but, it is quite handy in overall all productivity perspectives.  It’s like quick test method reference attached to every methods.

Note: The test status will only show as indicator once you have unit test ready and you build the solution. ( As similar we do during run the unit test in Visual Studio). If you clean the solution the test reference will be disappear  and will come back once you build the solution again .

You can turn it on/ off from “Code Indicator Information” settings.   ( Tools –> Options –> Code Information Indicator) .

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.