Book Image

Software Testing using Visual Studio 2012

By : Subashni. S, Satheesh Kumar. N
Book Image

Software Testing using Visual Studio 2012

By: Subashni. S, Satheesh Kumar. N

Overview of this book

<p>Testing is one of the main phases in the software development lifecycle. Managing the test scenarios, test cases, defects, and linking each one of these is bit of a challenge without using any tools. For frequently changing businesses, it is essential to address testing requirements by matching the pace of the business. This can only be achieved through automation of the possible testing scenarios to reduce the turnaround time of testing.</p> <p>Software Testing Using Visual Studio 2012 is a practical, hands-on guide that provides a number of clear, step-by-step exercises, which will help you to take advantage of the new features and real power of Visual Studio 2012.</p> <p>Software Testing Using Visual Studio 2012 starts with the basics of testing types and managing the tests using Test Explorer and a few other tools. Practical examples are added to help you understand the usage of various tools and features in a better way. Software Testing Using Visual Studio 2012 is written from a developer point of view and helps you take advantage of the unit testing features and customize the tests by generating the code and fine-tuning it as per your needs. The Test Manager is a standalone tool which is part of the Visual Studio tools family and takes care of test management. Software Testing Using Visual Studio 201 covers the usage of the test plan, test suite, manual testing, and exploratory testing using Test Manger and managing these aspects using these tools.</p> <p>Software Testing Using Visual Studio 2012 also covers the recording of user actions and creating automated tests out of it. This book covers generating and adding parameters to the recording and replacing it at runtime, adding validation and extraction rules to the tests, running the tests using command line commands, looking at the details of test results, and configuring the running the load test out of web performance or unit tests.</p> <p>This book helps you to understand the complete testing features and how to make use of automation features as well. It will appeal to both developers and testers.</p>
Table of Contents (20 chapters)
Software Testing using Visual Studio 2012
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Microsoft Test Manager


This is the new standalone product introduced, but this is not a part of Visual Studio 2012 Premium. It is a part of Visual Studio Test Professional and Visual Studio Ultimate. This is the functional testing tool, which provides the ability to create and execute manual tests and collect the results. This tool works without Visual Studio but does require a connection to the Team Foundation Server and the Team Project.

The Testing Center is used for creating Test Plans and creating Test Suites and test cases for the Test Plans. We can also associate the requirements to the Test Plans. The other features such as running the manual test and capturing the Test Results and defects, tracking the Test Results using existing queries and creating custom queries, organizing the test cases and shared steps for test cases, and maintaining the test configurations , that are supported by Testing Center.

Lab Center is used to set up and create lab environments for the test execution. The environments are created by using the Physical and Virtual machines with set of configurations. Later the environment is deployed so that the test would be conducted using the specified environment.

Connecting to Team Project

MTM should be connected to the TFS Team Project to create the Test Plans and test cases. The first task in opening MTM is to connect to the TFS Team Project from the Team Project collection , as shown in the following screenshot:

Test Plans, suites, and test cases

The Test Plan window in the Testing Center allows the creation of new Test Suites, test cases, and adding test cases based on requirements. Any number of test cases can be created or added and configured through this window. The first step is to create the Test Plan and Test Suite. Each Test Plan contains a set of Test Suites which helps us to plan the testing effort. For example, we can create a Test Plan for each sprint, if we are using agile methodology for the software development. The following screenshot has one Test Plan (MytestPlan) with two Test Suites as Add Numbers Test and Second Test Suite:

The next step is to create or add test cases to the suite. The requirements can be added to the plan and then test cases can be associated to the requirements. In the above example, three requirements are added to the first Test Suite, Add Numbers Test and new test cases are associated with the requirements. These requirements are available in TFS under the Team Project. If we follow the Application lifecycle management and tools available in TFS then we should have the requirements created as part of the requirements phase already.

Defining test cases

The creation of a test case involves the definition of a lot of properties for it. Each testing step and the expected result should be defined. The user scenarios, links, and attachments can be associated to the test cases. The test case can be classified under the specific area path and iteration path for the Team Project in TFS. Other properties such as Assigned To, State, Priority, and Automation status can be set for the test case as shown in the following screenshot:

Lab Center

The Lab Center in MTM helps us to create and configure different virtual/physical environments for our Test Runs, test settings such as defining the roles and configuring the data and diagnostics information for the selected roles, configuring the Test Controllers required for the test, and configuring the test library to store the environment information. The following screenshot shows the Lab Center without any environment:

We can see the details of these configurations later in Chapter 13, Test and Lab Center which explains the features of Testing Center and Lab Center.