You are previewing Software Testing with Visual Studio Team System 2008.
O'Reilly logo
Software Testing with Visual Studio Team System 2008

Book Description

A comprehensive and concise guide to testing your software applications with Visual Studio Team System 2008

  • Test your software applications with Visual Studio Team System 2008 and rest assured of its quality

  • Create a structured testing environment for your applications to produce reliable products

  • 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

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.

Table of Contents

  1. Software Testing with Visual Studio Team System 2008
    1. Table of Contents
    2. Software Testing with Visual Studio Team System 2008
    3. Credits
    4. About the Authors
    5. Preface
      1. What This Book Covers
      2. What You Need for This Book
      3. Who is This Book For
      4. Conventions
      5. Reader Feedback
      6. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Piracy
        4. Questions
    6. 1. Visual Studio Team System 2008 Test Types
      1. Software testing in Visual Studio Team System 2008
      2. Testing as part of Software Development Life Cycle
      3. Types of testing
        1. Unit test
        2. Manual test
        3. Web tests
        4. Load test
        5. Ordered test
        6. Generic test
      4. Test management and new testing features in VS 2008
        1. Team explorer
        2. Team system testing tools introduction
        3. Test view
          1. Test list editor
          2. Lists of tests
          3. Test results
          4. Code coverage results
        4. Overview of XML files for testing tools in Visual Studio 2008
      5. Summary
    7. 2. Unit Testing
      1. Creating unit tests
        1. Naming settings
        2. General settings
          1. Generated unit test code
      2. Assert statements
        1. Types of asserts
          1. The assert class
            1. Assert.AreEqual
            2. Assert.AreNotEqual
            3. Assert.AreSame
            4. Assert.AreNotSame
            5. Assert.Fail
            6. Assert.Inconclusive
            7. Assert.IsTrue
            8. Assert.IsFalse
            9. Assert.IsNull
            10. Assert.IsNotNull
            11. Assert.IsInstanceOfType
          2. StringAsserts
            1. StringAssert.Contains
            2. StringAssert.Matches
            3. StringAssert.DoesNotMatch
            4. StringAssert.StartsWith
            5. StringAssert.EndsWith
          3. CollectionAssert
            1. CollectionAssert.AllItemsAreNotNull
            2. CollectionAssert.AreEquivalent
            3. CollectionAssert.AreNotEquivalent
            4. CollectionAssert.AllItemsAreInstancesOfType
            5. CollectionAssert.IsSubsetOf
            6. CollectionAssert.IsNotSubsetOf
            7. CollectionAssert.AllItemsAreUnique
            8. CollectionAssert.Contains
            9. CollectionAssert.DoesNotContain
            10. CollectionAssert.AreEqual
            11. CollectionAssert.AreNotEqual
          4. AssertFailedException
          5. UnitTestAssertionException
          6. ExpectedExceptionAttribute
      3. Unit tests and generics
      4. Data-driven unit testing
      5. Unit testing an ASP.NET application
      6. Unit testing web services
      7. Code coverage unit test
      8. Summary
    8. 3. Web Testing
      1. Creating web test
      2. Recording a test
        1. Adding comments
        2. Cleaning the recorded tests
        3. Copying the requests
      3. Web test editor
        1. Web test properties
        2. Web test request properties
        3. Other request properties
          1. Form post parameters
          2. Query string parameters
          3. Extraction rules
          4. Validation rules
          5. Transactions
        4. Toolbar properties
          1. Add data source
          2. Set credentials
          3. Add recording
          4. Parameterize web server
            1. Context parameters
          5. Add web test plug-in
          6. Add request plug-in
          7. Performance session for the test
      4. Debug/running web test
        1. Settings for .testrunconfig file
          1. General
          2. Web test
          3. Controller and agent
          4. Code coverage
          5. Test timeouts
          6. Deployment
          7. Hosts
          8. Setup and cleanup scripts
        2. Running the test
          1. Web browser
          2. Request
          3. Response
          4. Context
          5. Details
      5. Summary
    9. 4. Advanced Web Testing
      1. Dynamic parameters in web testing
      2. Coded web test
        1. Creating a coded test from a recorded test
        2. Transactions in coded test
        3. Custom code
        4. Adding comment
        5. Running the coded web test
      3. Debugging coded web test
      4. Custom rules
        1. Extraction rule
        2. Validation rule
      5. Testing web services
      6. Summary
    10. 5. Load Testing
      1. Creating load test
        1. Load test wizard
          1. Specifying scenario
            1. Think time
            2. Load pattern
              1. Constant load
              2. Step load
            3. Test mix model and test mix
              1. Based on the total number of tests
              2. Based on the number of virtual users
              3. Based on user pace
            4. Browse mix
            5. Network mix
            6. Counter sets
            7. Run settings
            8. Threshold rules
        2. Editing load tests
          1. Adding context parameters
        3. Results store
        4. Running the load test
        5. Running load test using rig
        6. Working with test result and analyzing test results
          1. Graphical view
          2. Summary view
          3. Table view
          4. Exporting to Excel
      2. Summary
    11. 6. Manual, Generic, and Ordered Tests
      1. Manual tests
        1. Manual test using text format
        2. Manual test using Microsoft Word format
        3. Running a manual test
      2. Ordered tests
        1. Creating an ordered test
        2. Properties of an ordered test
        3. Executing an ordered test
      3. Generic tests
        1. Creating a generic tests
        2. Summary results file
        3. Properties of a generic test
      4. Summary
    12. 7. Managing and Configuring the Test
      1. Managing tests using test lists
        1. Organizing test list
        2. Test view
        3. Enabling/disabling tests
        4. Toolbar options
          1. Filtering tests
          2. Group By
      2. Configuring tests
        1. Test run configuration
          1. General
          2. Controller and agent
          3. Code coverage
          4. Deployment
          5. Hosts
          6. Setup and cleanup scripts
          7. Test timeouts
          8. Web test
          9. Editing test run configuration file
            1. Editing the deployment section
            2. Editing the code coverage
        2. Test properties
      3. Summary
    13. 8. Deploying and Running Tests
      1. Local deployment
      2. Remote deployment
      3. Deploy additional files
      4. Using deploymentItem attribute
      5. Deploy items for individual test
      6. Deployment order
      7. Running tests
      8. Run and rerun a test
      9. Pause, resume, and stop a test run
      10. Schedule test run
      11. Summary
    14. 9. Command Line
      1. MSTest utility
      2. Running a test from the command line
        1. /testcontainer
        2. /testmetadata
        3. /test
        4. /unique
        5. /noisolation
        6. /runconfig
        7. /resultsfile
        8. /noresults
        9. /nologo
        10. /detail
        11. Publishing test results
        12. /publish
        13. /publishbuild
        14. /flavor
        15. /platform
        16. /publishresultsfile
        17. Trace files
        18. Publishing
          1. Step 1: Create test project
          2. Step 2: Running the test
          3. Step 3: Create Build
          4. Step 4: Build Project
          5. Step 5: Publish Result
      3. Summary
    15. 10. Working with Test Results
      1. Test results
        1. Test as part of Team Foundation Server build
        2. Build report and test result
          1. Code coverage
          2. Build report with failed test
          3. Stack trace
          4. Creating Work Item from the result
          5. Publish test results
      2. Summary
    16. 11. Reporting
      1. TFS reports for testing
        1. Bugs
          1. Bug rates
          2. Bugs by priority
          3. Bugs found without corresponding tests
      2. Testing progress and effectiveness of reports
        1. Regression
        2. Tests passing with active bugs
        3. Tests failing without active bugs
        4. Load test summary
      3. Creating new report
        1. Report server project
          1. Create a new report in Excel
      4. Customizing report
      5. Summary
    17. Index