In this chapter, we will cover the following recipes:
Testing is one of the most important parts of any development process cycle. Starting from the classic Waterfall Software Development Life Cycle (SDLC) model to the modern Agile-based SDLC, testing forms one of the most important sections of any development process. After the development phase is complete, the application is sent for testing. Every application, irrespective of its volume or size, is thoroughly tested before it is released for production. Testing software is so important that no software can ever be successful without going through this phase. Large enterprises keep separate teams that dedicatedly test applications and frameworks before finalizing the release. The purpose of these testing teams is to find out hidden flaws/bugs in the software, which might have been produced because of some wrong or illegal input that has not been taken care of by the developers during the phase of development. Most of these bugs come from the validation of code blocks or even logical bugs. The main motive of the testing team is to produce test cases and a bug report, which is then sent back to the development team for rectification.
As we already know, Team Foundation Server (TFS) supports a number of critical and important features, which makes communication between the development and testing teams easy and quicker than ever before using Visual Studio 2013.
When we talk about testing, the most important and common form of testing that comes to mind is unit testing. Unit testing is a method by which the developers test their source code by factoring the smallest portion of the program called units, which can be individually tested, and calling these units from outside using various logical test cases or a range of values. This method finally asserts the expected output with the actual output from the program. In most cases, unit tests are written by the White Box testers during the development process.
Visual Studio 2013 comes with lot of advanced tools and techniques that can be used from inside the IDE to help developers easily write and run test cases on the code that they have been working on. Some of the interesting tools include:
It is worth noting that unit testing is a part of Visual Studio Test Framework defined inside the Microsoft.VisualStudio.QualityTools.UnitTestingFramework.dll
assembly, which is not a part of the .NET framework but a part of the Visual Studio IDE. You can work with the unit testing capabilities of Visual Studio using any version of Visual Studio except the Express edition.
In this chapter, we are going to cover some of the interesting and useful ways to define tests for our code.
3.143.235.23