About This Book

Comprehensive yet concise guide with a lot of examples and clear explanations

No knowledge of software testing is required, only basic knowledge of Visual Studio 2008 operation is expected

Who This Book Is For

This book is for Microsoft developers working with Visual Studio 2008 who need to create a structured testing environment for their applications. No prior knowledge of testing is expected. The reader will need to be familiar with the standard Visual Studio 2008 environment, but anyone who has entered and compiled code in this environment before will easily follow what goes on.

Table of Contents

Chapter 1: Visual Studio Team System 2008 Test Types

Software testing in Visual Studio Team System 2008

Testing as part of Software Development Life Cycle

Types of testing

Test management and new testing features in VS 2008

Summary

Chapter 2: Unit Testing

Creating unit tests

Assert statements

Un﻿﻿it tests and generics

Dat﻿﻿a-driven unit testing

Unit tes﻿﻿ting an ASP.NET application

Un﻿﻿it testing web services

Code coverage unit test

Summary

Chapter 3: Web Testing

Creating web test

Recording a test

Web test editor

Debug/running web test

Summary

Chapter 4: Advanced Web Testing

Dynamic parameters in web testing

Coded web test

Debugging coded web test

Custom rules

Testing web services

Summary

Chapter 5: Load Testing

Creating load test

Summary

Chapter 6: Manual, Generic, and Ordered Tests

Manual tests

Ordered t﻿ests

Generic tests

Summary

Chapter 7: Managing and Configuring the Test

Managing tests using test lists

Configuring tests

Summary

Chapter 8: Deploying and Running Tests

Local deployment

Rem﻿﻿ote deployment

Depl﻿﻿oy additional files

Using deploymentItem attribute

Deploy﻿ items for individual test

Deploym﻿ent order

Running﻿ tests

Run and﻿ rerun a test

Pause, r﻿esume, and stop a test run

Schedule test run

Summary

Chapter 9: Command Line

MSTest utility

Running a test from the command line

Summary

Chapter 10: Working with Test Results

Test results

Summary

Chapter 11: Reporting

TFS reports for testing

Testing progress and effectiveness of reports

Creating new report

Customizing report

Summary

What You Will Learn

Explore the testing types offered by Visual Studio Team system 2008 Test Edition

Test your website before going live and rest assured of its performance; customize the test to meet your requirements

Load-test your applications to check application performance under various conditions

Collect and analyze the test results to improve the quality of your applications

Master various formats of manual testing to help test without automation tools

Manage, filter, and configure the test to control the execution of your application

Deploy your tests using local as well as remote deployment and run them

Run your tests and publish the results from a command line using MSTest tool

Create and utilize reports to see the progress and quality of your project

Chapter 1: Software Testing and Visual Studio Team System 2008 This chapter gives an overall introduction to software testing and the types of testing involved in the software development life cycle (SDLC) and an introduction to the different tools available in Visual Studio team system 2008 to support different testing types for the SDLC.

Chapter 2: Unit Testing This chapter explains the testing tool used by developers to make sure the code produces the expected result. Creating unit tests, generating code and different assert statements and types used for testing are explained in detail in this chapter. Various attributes used for differentiating the classes with test classes and method with test methods, and the initializing and cleaning methods are also explained in detail in this chapter.

Chapter 3: Web Testing This chapter walks us through the tool used for testing web applications developed using .NET. This tool is used for recording a test scenario and then testing it with sample data from different data sources. Applying validation and extraction rules, adding data sources, and adding transactions are explained in detail using a sample application in Visual Studio Team System 2008. Some of the features like adding Plug-ins, parameterizing the web server, and running and debugging the web test are covered in this chapter.

Chapter 4: Advanced Web Testing Generating coded web tests from recorded web tests and creating coded web tests using the Visual Studio team System 2008 tool are explained in detail with examples. Some of the other advanced topics covered are adding dynamic parameters, adding rules to the coded web test, creating custom rules, and running the coded web test.

Chapter 5: Load Testing This chapter explains using unit testing or web testing and simulating a realistic scenario like a number of concurrent users with different browsers and different network speed from multiple locations accessing the system. This testing collects the application performance and stability in different scenarios and is used for analyzing the result to scale the application for better performance.

Chapter 6: Manual, Generic, Ordered, and Smoke Test This chapter explains different tools that support testing an application manually without using any automated testing tool. In the case of multiple interdependent tests, we can easily order the tests to run in a specific order so that the dependent tests don't fail the test. Visual studio supports all of these including Generic and Smoke tests which are explained here.

Chapter 7: Managing and Configuring Tests Even though we have lot of testing types and tools, sometime managing these tests would be a very difficult task. This chapter explains the easy ways of organizing the tests into lists, enabling and disabling the tests, configuring the tests and test runs, viewing the tests using the Test view window and test list editor and running the tests in Visual studio Team System 2008.

Chapter 8: Deploying and Running the tests Once we are ready with the required type of test for the application, we have to deploy that on the test machines and run the test application and collect the result for analysis. There are multiple ways of deploying the application and running the application using some of the advanced features provided by Visual Studio Team system 2008, which are explained in detail in this chapter.

Chapter 9: Command Line There are different ways of running a test based on the environment and requirements. In some situations we may need a test to be run from the command line without using the user interface. It works the same way but the test runs without any user interaction. This chapter explains different command-line options and parameters used for running a test using command-line commands.

Chapter 10: Working with Test Results The main objective of running the tests is to collect the results and analyze them to correct any application errors and make sure it is producing the expected result and to increase the performance and stability of the application. This chapter explains in detail how to look at the test results and code coverage and publish the test results.

Chapter 11: Reporting Reporting is one of the main areas of software development where the software quality is reported and monitored. Visual Studio Team System 2008 supported by Team Foundation Server provides lot of reporting templates and features to upload the test result and publish it to the management and the team to monitor the project quality and performance. This chapter explains the detailed steps involved in publishing the results and creating and customizing the report using the available reporting templates in Visual Studio 2008 Team system and Team Foundation Server.

In Detail

We all know that software testing is the most important part of the Software development life cycle and the quality of the end product is mostly dependent on how well we test our products. But, testing is neither an easy process nor remotely exciting for all the developers.

For testing your applications on the Microsoft platform, Visual Studio Team System 2008 offers you a range of powerful tools for different types of testing. This Microsoft product makes the testing process easier as well as more exciting, not boring anymore.

This concise guide will lead you through the bewildering range of features offered by Visual Studio Team System 2008 to test your software applications before going live. It is packed with simple examples and screenshots to get you comfortable with the VS Team System 2008 testing environment.

The book introduces you to the main types of testing available in VS Team System 2008 for both desktop and web applications, and then walks you through deploying, running, and interpreting the results of tests. If you've been testing applications in Visual Studio 2005, the book will show you how you can move this easily to Visual Studio 2008.

You will learn about the Unit test, Manual test, Web test, Load test, Ordered test, and Generic test, and the support for them in VS Team System 2008. By the end of the book you will be using the tools to manage and run your tests, collect and analyze your test results, and improve the reliability of your software applications.

Later, you will prepare reports to monitor the quality of your software applications, using the available reporting templates in Visual Studio 2008 Team system and Team Foundation Server.

Authors

N Satheesh Kumar

N. Satheesh Kumar has Bachelor’s Degree in Computer Science Engineering and has around twelve years of experience in software development life cycle, project, and program management.

Subashni. S

Subashni S holds a Bachelor’s Degree in Computer Science engineering and has around 15 years of experience in software development and testing life cycle, project, and program management. She is a certified PMP (Project Management Professional), CSTM (Certified Software Test Manager), and ITIL V3 Foundation certified. She started her career as a DBA in Oracle 8i technology, and later developed many software applications using Borland software products for a multinational company based in Chennai, and then moved to Bangalore. She is presently working for a multinational company, in the area of Project Management for developing and testing projects. She is also currently working for one of the top multinational companies headquartered at Austin, Texas.

She has also authored Software Testing using Visual Studio Team System 2008 and Software Testing using Visual Studio 2010 for Packt Publishing.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.