Writing Unit Test in Visual Studio is very easily and it comes up with Microsoft Unit Test Framework that gives us an added advantages. Visual Studio provides lots of tool and utility to Write, Execute and Verify your code. Also there are multiple things that we need to consider with respect to writing unit test, for an example mocking, code coverage etc.
I wrote a series of posts ( and keep continuing writing ..) on writing Unit Test and different utility with in Visual Studio at Daily .NET Tips. You may consider to follow them one by one to gain more knowledge and tips and tricks unit test.
- How to write your very first Unit Test in Visual Studio using MSTest Framework easily ?
- Exploring and Managing Unit Tests Using Test Explorer in Visual Studio
- Run Tests After Build – Automatically Running Unit Test After Build Success in Visual Studio
- Understanding Code Coverage – How to determine which portion of code is being tested in Visual Studio ?
- Create and Run Subset of Unit Tests Using Playlist in Visual Studio
- How to customize color settings for Code Coverage Result in Visual Studio ?
- How to copy and share the execution details of Unit Test methods from the Test Explorer in Visual Studio ?
Updated Post :
- Step-By-Step working with Unit Test in Visual Studio 2015
- Write Unit Test Automatically using IntelliTest in Visual Studio 2015
So far, this will give you a very good start and understanding of write unit test, using different tools within visual studio, learning code coverage etc. I will publish few more posts and tips over there . Keep following the.