Home > Software Quality Tips > > Building, using tests on Microsoft Visual Studio Team System
Software Quality Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Building, using tests on Microsoft Visual Studio Team System


David W. Johnson
07.16.2009
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Table of contents

1. Building, using tests on Microsoft VSTS: .webtests
2. Tutorial: Using Microsoft VSTS .loadtest

Microsoft Visual Studio Team System 2008 (VSTS) has become a mature load testing tool for web-enabled applications. Its strength comes from combining an integrated development environment and a testing framework that supports load testers who may or may not be .NET developers. In my experience VSTS is a good candidate for any organization moving into load testing of web-enabled applications, especially when Visual Studio .NET is the development platform of choice.

In this tutorial, I will begin with a brief overview on how to create a VSTS .webtest, followed by an overview on how to craft a VSTS .loadtest. During this overview we will introduce VSTS technical tips that will help you use VSTS more effectively or, at least, provide alternative routes for successfully employing VSTS for load testing web applications.

There are several papers available on the Internet that address the process of creating a VSTS .webtest and using .webtest(s) to create one or more VSTS .loadtest (s) I will not attempt to duplicate the content of these articles.

VSTS webtest

Recording a .webtest

VSTS Web Testing supports recording activity against an existing website. This is accomplished using a traditional play-and-record process that allows us to record new web tests in a new or existing test project. Recordings are saved once the browser window is closed we can then instrument the recording from within the VSTS.

Recording Tip 1: Comments

Insert comments during the recording process to capture the intent of each event as it occurs. The intent may not be so obvious once you are looking at a s...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Software performance, load and stress testing
Performance testing tools - Commercial, less expensive and free
Easing software performance testing and usability modeling pressures
Software Testing: New software testing technologies bring new challenges
Drilling deep into performance testing at STPCon
STPCon: Do reality checks on performance test products, panelists advise
Ways to approach application performance testing on a tight budget
Data warehouse/BI performance testing tool recommendations
Software testers facing six big challenges today, StarWest keynoter says
Is manually testing a software project for flaws too risky?
At the movies: Exploratory, performance, security testing a kiosk

Software integration testing
Free Web proxy security tools software testers should get to know
Ajax testing: Using available tools is key
Configuration testing: QA pros discuss 10 things you may not know
What is system integration testing?
What type of designs are needed to write integration test cases?
Who is responsible for integration testing, developer or tester?
How to develop a checklist for unit, integration and system testing
Integration testing: Is it black box or white box testing?
How to use tools for system integration testing
An approach to integration testing

Automated software testing
ThoughtWorks Studios' Mingle captures "murmurs" and "waves" around project
Accelerating Agile testing with computer assistance
Improving software testing productivity using record-playback
Using automation to speed up software testing in Agile
Software consortium seeks standard quality metrics
Software testers facing six big challenges today, StarWest keynoter says
Affordable automated testing tools for securing websites
Classic inspiration for modern software test problems in QA
Expert advises on implementation of Selenium IDE for effective software testing
When should regression testing occur in an automated test plan?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
integration testing  (SearchSoftwareQuality.com)
performance testing  (SearchSoftwareQuality.com)
shotgun debugging  (SearchSoftwareQuality.com)
stress testing  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


tream of http requests without an interface to use as a reference.

Recording Tip 2: Think Time

Think Time is the property that defines the user wait time between requests. Always try to approximate typical user think time these values can have significant impacts on the run characteristics of future test runs. If you don't believe the think times are appropriate adjust them after recording.

Instrumenting a .webtest

The recorded .webtest certainly provides the raw .webtest framework. This framework needs to be appropriately instrumented, modified, and customized to meet your load testing needs.

Instrument Tip 1: Transactions

Transactions allow you to package http requests into logical packages. Transactions are used when reporting on a .loadtest run using a consistent self-sorting naming convention can make future reporting across several .webtest(s) extremely easy. For example:

  • application_Business Event_Step_Page
  • HelpApplication_Login_01_Homepage

    Instrument Tip 2: Validation Rules

    Validation rules examine the HTTP response and check that it is performing as expected. There are several validation rules provided with VSTS, but the most useful one, in my experience, validates the existence of a text string in the given response (ValidationRuleFindText). If a validation rule fails, the request will be marked as failed - the Details tab will provide an explanation for what failed.

    The validation rules provide several mechanisms to ensure the expected behavior has occurred it is important to remember that you are not functionally testing the application you are testing the architecture. To date the most useful and consistent are:

  • Maximum Request Time to validate the response occurred within X ms.
  • Response URL to validate the URL is the one that is expected (if this can be predicted).
  • Find Text to validate text contained within the response.

    Instrument Tip 3: Extraction Rules

    Extraction rules capture a response value to be used later usually within a request. VSTSautomatically adds an ExtractHiddenFields rule when data is posted back in the second request. While this ability certainly helps support later executions of the .webtest it does not address (catch) all correlation issues fortunately VSTS comes preloaded with several extraction rules and the ability to extend the extraction rules.

    Instrument Tip 4: Binding Test Data

    Extraction and validation rules provide for data capture/entry within the Properties window. Text can be pulled from a database making it possible to create a data driven .webtest that can be leveraged when creating a .loadtest. Parameters associated with the data source are associated with a column in the data source on consumption of the data row the value of that row/column will be assigned to the parameter. This is a very powerful tool when creating a data driven .webtest that becomes even more important when the .webtest is included within a .loadtest.

    Instrument Tip 5: Consuming Test Data

    There are several ways to consume Test Data: random, unique, and sequential. Unique is very useful for standalone execution of the .webtest to detect and remove data issues before a performance run. Sequential supports formal performance runs, if the data set is large enough to support the user load you should not encounter data collisions - remember the setting in the ".webtest" is what is used by the ".loadtest".

    Executing a .webtest

    Executing a .webtest as a data driven test will enable you to detect issues before they are presented during .loadtest execution. It should be noted that the .webtest is the framework upon which a .loadtest executes (transactions, extractions, validations, and data). It is important to ensure the .webtest is stable before incorporating it into your .loadtest.

    Execution Tip 1: Verification

    Verification occurs only as it has been defined within the .webtest this means that a .webtest with no verification rules will always pass not matter what the actual behavior of the application. Thoroughly test the behavior of the .webtest verifying requests and responses are behaving as expected and that adequate verification rules have been applied.


    Next: Load testing with Microsoft VSTS


    About the author: David W Johnson "DJ" is a senior test architect with over 22 years of experience in information technology across several industries having played key roles in business needs analysis, software design, software development, testing, training, implementation, organizational assessments, and support of business solutions.


    Rate this Tip
    To rate tips, you must be a member of SearchSoftwareQuality.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Software Design & Testing - Project Management
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts