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

Index

A

  • action recording, coded UI test /
  • AddCommentToResult method /
  • Assert
    • about /
  • Assert.AreEqual
    • about /
    • overloaded methods /
  • Assert.AreNotEqual
    • about /
  • Assert.AreNotSame
    • about /
    • overloaded methods /
  • Assert.AreSame
    • about /
    • overloaded methods /
  • Assert.Fail
    • about /
    • overloaded methods /
  • Assert.Inconclusive
    • about /
    • overloaded method /
  • Assert.IsFalse
    • about /
    • overloaded methods /
  • Assert.IsInstanceOfType
    • about /
    • overloaded methods /
  • Assert.IsNotNull
    • about /
    • overloaded methods /
  • Assert.IsNull
    • about /
    • overloaded methods /
  • Assert.IsTrue
    • about /
    • overloaded methods /
  • Assert class
    • about /
  • AssertFailedException
    • about /
  • assert statements
    • about /

B

  • browser mix
    • defining /
  • bug status report
    • about /
  • bug trends report
    • about /
  • build quality indicators report
    • about /
  • build success over time report
    • about /
  • build summary report
    • about /
  • burn down and burn rate report
    • about /

C

  • C# /
  • ClassCleanup() method /
  • ClassCleanup method
    • about /
  • ClassInitialize() method /
  • code
    • generating, from recorded test /
  • code coverage
    • about /
    • blocks /
    • lines /
    • elements, excluding /
  • code coverage feature
    • about /
  • coded test
    • transactions /
  • coded UI test
    • controls, adding /
    • validations, adding /
  • CodedUITest.cs file
    • about /
  • CodedUITest1.cs file
    • about /
  • Coded UI Tests (CUIT)
    • about /
    • supported files /
    • from action recording /
    • creating /
    • files /
  • coded web test
    • about /
    • advantage /
    • running /
    • debugging /
  • Coded Web tests
    • about /
  • coding phase
    • about /
  • CollectionAssert
    • about /
  • CollectionAssert.AllItemsAreInstancesOfType
    • about /
    • overloaded methods /
  • CollectionAssert.AllItemsAreNotNull
    • about /
    • overloaded methods /
  • CollectionAssert.AllItemsAreUnique
    • about /
    • overloaded methods /
  • CollectionAssert.AreEqual
    • about /
    • overloaded methods /
  • CollectionAssert.AreEquivalent
    • about /
    • overloaded methods /
  • CollectionAssert.AreNotEqual
    • about /
    • overloaded methods /
  • CollectionAssert.AreNotEquivalent
    • about /
    • overloaded methods /
  • CollectionAssert.Contains
    • about /
    • overloaded methods /
  • CollectionAssert.DoesNotContain
    • about /
    • overloaded methods /
  • CollectionAssert.IsNotSubsetOf
    • about /
    • overloaded methods /
  • CollectionAssert.IsSubsetOf
    • about /
    • overloaded methods /
  • comment
    • adding, to web test /
  • comments
    • adding, to recording /
  • conditional rules
    • about /
    • Context Parameter Exists /
    • Cookie Exists /
    • Cookie Value Comparison /
    • Last request Outcome /
    • Last Response Code /
    • Number Comparison /
    • Probability Rule /
    • String Comparison /
  • Constant load option /
  • Constant Load Pattern /
  • context parameters
    • creating /
    • adding /
  • controls
    • adding, to coded UI test /
  • counter sets, Load Test Wizard
    • about /
  • custom rules
    • about /
    • extraction rules /
    • validation rules /

D

  • /detail option
    • about /
  • data-driven unit testing
    • about /
  • Data and Diagnostics, test settings /
  • Data and Diagnostics setting, .testsettings file /
  • DataBinding attribute /
  • data driven coded UI test
    • about /
  • DataSource attribute /
  • data sources
    • adding /
  • deployed environment
    • about /
  • DeploymentItem attribute /
  • Deployment section, test settings /
  • Deployment setting, .testsettings file /
  • detail view, Test Results /
  • dynamic parameters, web testing /

E

  • ExpectedExceptionAttribute
    • about /
  • exploratory testing
    • about /
  • extraction rules /
    • Selected Option /
    • Tag Inner Text /
    • Extract Attribute Value /
    • Extract Form Field /
    • Extract HTTP Header /
    • Extract Regular Expression /
    • Extract Text /
    • Extract Hidden Fields /
  • extract method /

F

  • /flavour option
    • about /
  • Fakes
    • about /
    • used, for unit testing /
  • files, Coded UI Tests (CUIT)
    • CodedUITest1.cs file /
    • UIMap.Designer.cs file /
    • UIMap.cs file /
    • UiMap.uitest file /
  • Finalizer method
    • about /
  • Form POST Parameters /

G

  • General option, test settings /
  • General section, .testsettings file /
  • generics
    • about /
    • and unit tests /
  • generic test
    • about /
  • generic tests
    • about /
    • creating /
    • parameters /
    • summary results file /
  • Goal Based Load Pattern /
  • graphical view, Test Results
    • about /
    • Key Indicators /
    • Page Response Time /
    • System under Test /
    • Controller and Agents /

H

  • Hosts, .testsettings file /
  • Hosts option, Test settings /
  • HTTP-GET protocol
    • about /
  • HTTP-POST protocol
    • about /

I

  • ICollection interface
    • about /
  • IComparer
    • about /
  • Integrated Development Environment (IDE)
    • about /
  • integration testing
    • about /
    • top-down approach /
    • bottom-up approach /
    • umbrella approach /

L

  • /ListTests option
    • about /
  • Lab Center
    • about /
    • environments /
    • deployed environment /
  • lab management
    • about /
  • Lab Management environments
    • about /
  • Load Pattern
    • about /
    • defining /
    • constant load /
    • step load /
  • Load Test
    • creating /
    • editing /
    • context parameters, adding /
    • running /
  • load testing
    • about /
  • Load Test Wizard
    • about /
    • scenarios, specifying /
    • counter sets /
    • Run Settings /
  • loop logic
    • about /

M

  • manual testing
    • about /
  • manual tests
    • running /
    • action recording /
    • parameters, adding /
  • Microsoft.VisualStudio.TestTools.UnitTesting namespace
    • about /
  • Microsoft Developer Network (MSDN) /
  • Microsoft Excel
    • Test Results, exporting to /
  • Microsoft Test Manager (MTM)
    • about /
    • connecting, to TFS project /
  • Microsoft Test Manager 2012 (MTM)
    • about /
  • MSTest utility
    • options /
    • about /
    • used, for running tests /
    • /testcontainer option /
    • /testmetadata option /
    • /test option /
    • /unique option /
    • /noisolation option /
    • /testsettings option /
    • /resultsfile option /
    • /nologo option /
    • /publish option /
    • /publishbuild option /
    • /platform option /
    • /publishresultsfile option /
  • MyTestCleanup() method /
  • MyTestInitialize() method /

N

  • /noisolation option
    • about /
  • /nologo option
    • about /
  • Network Mix
    • defining /

O

  • ordered test
    • about /
  • ordered tests
    • about /
    • creating /
    • executing /
  • Organize tab, Testing Center /
  • out-of-box reports
    • about /
    • bug status report /
    • bug trends report /
    • reactivations report /
    • build quality indicators report /
    • build success over time report /
    • build summary report /
    • burn down and burn rate report /
    • remaining work report /
    • stories overview report /
    • stories progress report /
    • unplanned work report /
    • test case readiness report /
    • test plan progress report /
  • overloaded method, Assert class
    • Assert.AreEqual /
    • Assert.AreNotEqual /
    • Assert.AreSame /
    • Assert.AreNotSame /
    • Assert.Fail /
    • Assert.Inconclusive /
    • Assert.IsTrue /
    • Assert.IsFalse /
    • Assert.IsNull /
    • Assert.IsNotNull /
    • Assert.IsInstanceOfType /
  • overloaded methods, CollectionAssert
    • CollectionAssert.AllItemsAreNotNull /
    • CollectionAssert.AreEquivalent /
    • CollectionAssert.AreNotEquivalent /
    • CollectionAssert.AllItemsAreInstancesOfType /
    • CollectionAssert.IsSubsetOf /
    • CollectionAssert.IsNotSubsetOf /
    • CollectionAssert.Contains /
    • CollectionAssert.DoesNotContain /
    • CollectionAssert.AreEqual /
    • CollectionAssert.AreNotEqual /
  • overloaded methods, StringAsserts
    • StringAssert.Contains /
    • StringAssert.Matches /
    • StringAssert.DoesNotMatch /
    • StringAssert.StartsWith /
    • StringAssert.EndsWith /

P

  • /platform option
    • about /
  • /publishbuild option
    • about /
  • /publish option
    • about /
  • /publishresultsfile option
    • about /
    • existing test project, creating /
    • existing test project, using /
    • test, running /
    • build, creating /
    • project, building /
    • result, publishing /
  • parameters
    • adding, to manual tests /
  • parameters, generic tests /
  • Pivot chart /
  • Pivot table /
  • Plan tab, Testing Center /
  • PostPage method /
  • PostRequest method /
  • PostTransaction event /
  • PostWebTest event /
  • PrePage method /
  • PreRequestDataBinding method /
  • PreRequest method /
  • PreTransaction event /
  • PreWebTest event /

Q

  • Query-based Test Suite
    • about /
  • QueryString parameters /

R

  • .runsettings file
    • used, for configuring unit tests /
  • /resultsfile option
    • about /
  • reactivations report
    • about /
  • recorded request
    • copying /
  • recorded test
    • code, generating from /
  • recorded tests
    • cleaning /
  • recording
    • comments, adding to /
  • regression testing
    • about /
  • remaining work report
    • about /
  • report
    • building /
  • report definition
    • creating, Visual Studio 2012 used /
  • Requirement-based Test Suites
    • about /
  • Result store
    • about /
  • Roles option, test settings /
  • Roles setting, .testsettings file /
  • Run Settings, Load Test Wizard
    • about /
    • threshold rules /

S

  • sanity testing
    • about /
  • scenarios, Load Test Wizard
    • specifying /
    • think time /
    • Load Pattern, defining /
    • Test Mix Model, defining /
    • Network Mix, defining /
    • browser mix, defining /
  • SDLC
    • about /
  • settings, .testsettings file
    • General section /
    • Roles /
    • Data and Diagnostics /
    • Deployment /
    • Setup and Cleanup Scripts /
    • Hosts /
    • Test Timeouts /
    • Unit Test /
    • Web Test /
  • Setup and Cleanup Scripts section, test settings /
  • Setup and Cleanup Scripts setting, .testsettings file /
  • shared steps
    • about /
    • action, recording /
    • creating /
  • shared test steps
    • about /
  • Shims
    • about /
    • versus Stubs /
  • Simple Web tests
    • about /
  • SOAP protocol
    • about /
  • software testing
    • about /
  • Static Test Suite
    • about /
  • Status on all iterations report /
  • Step load option /
  • Step Load Pattern /
  • stories overview report
    • about /
  • stories progress report
    • about /
  • StringAssert.Contains
    • about /
    • overloaded methods /
  • StringAssert.DoesNotMatch
    • about /
  • StringAssert.EndsWith
    • about /
  • StringAssert.Matches
    • about /
  • StringAssert.StartsWith
    • about /
  • StringAsserts
    • about /
  • Stubs
    • about /
    • versus Shims /
  • summary results file, generic tests /
  • summary view, Test Results
    • about /
    • Test Run Information /
    • Test Results /
    • Page Results /
    • Transaction Results /
    • System under Test Resources /
    • Controller and Agents Resources /
    • Errors /
  • System Center Virtual Machine Manager (SCVMM)
    • about /
  • system testing
    • about /

T

  • .testsettings file
    • settings /
  • /testcontainer option
    • about /
  • /testmetadata option
    • about /
  • /test option
    • about /
  • /testsettings option
    • about /
  • /Tests option
    • about /
  • tables view, Test Results
    • about /
  • TCM
    • about /
  • tcm.exe tool
    • about /
  • Team Foundation Server (TFS) /
    • about /
    • built-in reports /
  • Team Project
    • Test Manager tool, connecting to /
  • test
    • recording /
    • running /
  • Test Agents
    • using /
    • configuring /
  • Test Case
    • adding, to Test Plan /
  • test case management
    • about /
  • test case readiness report
    • about /
  • test cases
    • defining /
  • TestClass() method /
  • TestCleanup() method /
  • TestCleanup method
    • about /
  • Test Controller
    • using /
    • configuring /
  • Test Explorer
    • about /
  • Test Impact View
    • about /
  • testing
    • about /
  • Testing Center
    • about /
    • Plan tab /
    • Test tab /
    • Track tab /
    • Organize tab /
  • testing tools
    • about /
  • testing types
    • about /
    • unit testing /
    • manual testing /
    • exploratory testing /
    • web performance tests /
    • Coded UI Tests (CUIT) /
    • load testing /
    • ordered test /
    • generic test /
  • TestInitialize() method /
  • Test List Editor
    • about /
  • test management
    • about /
  • Test Manager tool
    • about /
    • connecting, to Team Project /
  • TestMethod() method /
  • Test Mix Model
    • defining /
    • based on total number of tests /
    • based on number of virtual users /
    • based on user pace /
    • based on sequential test order /
  • Test Plan
    • about /
    • Test Suite, adding /
    • Test Case, adding /
    • tests, importing to /
    • tests, running in /
  • test plan progress report
    • about /
  • test plans
    • about /
  • test project
    • creating, Visual Studio 2012 used /
  • test results
    • publishing /
    • about /
    • building /
    • work item, creating from /
  • Test Results
    • analyzing /
    • exporting /
    • graphical view /
    • summary view /
    • tables view /
    • detail view /
    • exporting, to Microsoft Excel /
  • test run configuration file
    • editing /
  • Test Runner
    • about /
  • test runs
    • about /
  • tests
    • recorded request, copying /
    • running, VSTest.Console used /
    • running, MSTest utility used /
    • importing, to Test Plan /
    • running, in Test Plan /
    • as part of Team Foundation Server build /
  • Test settings
    • using /
    • General option /
    • Roles option /
    • Data and Diagnostics page /
    • Deployment section /
    • Setup and Cleanup Scripts section /
    • Hosts option /
    • Test Timeouts option /
    • Unit Test option /
    • Web Test option /
  • test suite
    • about /
  • Test Suite
    • adding, to Test Plan /
    • about /
    • types /
  • Test Suites
    • Static Test Suites /
    • Query-based Test Suites /
    • Requirement-based Test Suites /
  • Test tab, Testing Center /
  • Test Timeouts, .testsettings file /
  • Test Timeouts option, Test settings /
  • Test View
    • about /
  • TFS project
    • MTM, connecting to /
  • think time
    • about /
  • threshold rules /
  • toolbar properties, web performance test editor
    • about /
    • data source, adding /
    • user credentials, setting /
    • recording, adding /
    • parameterize web server /
    • web test plug-in, adding /
  • Track tab, Testing Center /
  • transactions
    • about /

U

  • /unique option
    • about /
  • UIMap.cs file
    • about /
  • UIMap.Designer.cs file
    • about /
  • UIMap.uitest
    • about /
  • UiMap.uitest file
    • about /
  • uniform resource identifier (URI) /
  • Unit Test, .testsettings file /
  • UnitTestAssertionException
    • about /
  • unit testing
    • about /
    • Fakes used /
  • unit testing, Fakes
    • Stubs /
    • Shims /
  • Unit Test option, Test settings /
  • unit tests
    • creating /
    • and generics /
    • configuring, .runsettings file used /
  • unplanned work report
    • about /

V

  • Validate method /
  • validation rules
    • about /
    • Selected Option /
    • Tag Inner Text /
    • Response Time Goal /
    • Form Field /
    • Find Text /
    • Maximum Request Time /
    • Required Attribute Value /
    • Required Tag /
    • Response URL /
    /
  • validations
    • adding, to coded UI test /
  • VB.NET /
  • virtual environment
    • about /
  • Visual Studio 2012
    • software testing /
    • testing features /
    • test manamgement /
    • test project, creating /
    • used, for creating report definition /
  • VSTest.Console utility
    • about /
    • used, for running tests /
    • /Tests option /
    • /ListTests option /

W

  • web performance test
    • about /
    • creating /
  • web performance test editor
    • about /
    • conditional rules /
    • toolbar properties /
  • web performance testing
    • about /
  • web performance tests
    • about /
    • loops, adding /
  • web server
    • parameterizing, in web test /
  • web test
    • properties, setting for /
    • debugging /
    • running /
    • comment, adding /
  • Web Test, .testsettings file /
  • WebTest class /
  • WebTest constructor /
  • web testing
    • dynamic parameters /
  • Web Test option, test settings /
  • web test plug-in
    • adding /
  • web test recorder
    • about /
    • Record option /
    • Pause option /
    • Stop option /
    • Add a Comment option /
    • Clear all requests option /
  • web test request properties
    • about /
    • Expected HTTP status code /
    • Follow redirects /
    • Record results /
    • Response time goal(Seconds) /
    • Url /
    • Form POST Parameters /
    • QueryString parameters /
    • extraction rules /
    • validation rules /
    • transactions /
  • Web tests
    • Simple Web tests /
    • Coded Web tests /
  • work item
    • creating, from test results /

X

  • xsd.exe utility /