wp_dotnet_In_Network

Document Sample
wp_dotnet_In_Network Powered By Docstoc
					                                                                                WHITEPAPER




Adobe Reader version 4.1 or higher is needed to view this document.
Please visit http://www.adobe.com for your free upgrade.
First Name:
Last Name:
Email Address:
Job Title:
Business Phone:
Company:
Address 1:
Address 2:
City:
State/Province:                                  -- Select One --
Zip/Postal Code:
Country:                                         UNITED STATES
# of Employees:                                  -- Select # of employees --
Department:                                      -- Select your department --
Industry:                                        -- Select your industry --
What is your timeframe for purchase?             -- Select one --
What are you in the market for?                  -- Select one --


             Quality Assurance and .NET
Do you currently use testing or performance
management tools?                                -- Select one --
          Testing
If yes, what tool(s)? to Ensure the Success of .NET Applications
What is your budget?                             -- Select one --
    Introduction
    In February 2002, Microsoft announced Visual Studio .NET to its adoring fans, vocal critics and the rest of us. The
                                                                                                                                  QA professionals have been
    introduction of .NET signaled Microsoft’s unmistakable entry into enterprise application development even though              dealing with complex functionality
    some would argue that the venerable if unsophisticated Visual Basic language played the role of unsung hero in
    many corporate applications long before .NET arrived. With .NET, Microsoft gave developers its new C# language,               of .NET applications since
    an overhauled Visual Basic, and a new library of over 4,500 classes.                                                          .NET was introduced in 2002.
    Most importantly for developers and QA professionals, .NET brought some interesting new development and                       This paper discusses best
    deployment techniques that simplified and expanded the reach of enterprise application development. Capabilities
    such as Web Services and object-oriented programming exist elsewhere, but their inclusion gives credence to                   practices for functional,
    using .NET in the enterprise. In addition to these broad industry-wide advances, Microsoft improved its own new
    classes, controls, and IDE to ease the burden on developers creating ever more complex Web, Windows, and
                                                                                                                                  regression and load testing
    mobile applications. The .NET framework includes base framework classes, data and XML classes, and specific                   of .NET applications.
    classes for XML Web Services, Web Forms, and Windows forms development.

    Developers and end-users gain much from .NET but what does it mean to those responsible for ensuring the quality
    of .NET applications? QA professionals must deal with the broad scope of .NET applications and address some
    behind-the-scenes functionality that aids developers but can complicate testing. However, armed with some
    .NET specific knowledge, .NET-aware test tools, and a firm grasp of testing principles, QA professionals should
    have no trouble in both improving the quality of .NET applications and sharing valuable feedback with developers
    building .NET applications.




    Figure 1: .NET Framework.


    In this article, we focus on functional, regression and load testing, phases where knowledge specific to .NET can
    help diagnose problems. Whether migrating from an old ASP application or starting anew, it pays to have some
    specific .NET testing knowledge. We will not address developer-centric techniques such as tracing, debugging,
    and error handling except to mention that the Visual Studio .NET IDE has some useful new tools for debugging
    and tracing that can help diagnose code-level issues. Also, in addition to functional, regression and load testing,
    QA staff still need to perform browser compatibility, usability and (in the case of Web Services) interoperability
    testing where appropriate.

    Specifically, we’ll talk about functional, regression and performance testing issues in three common application scenarios:
      Enterprise Web Applications (ASP.NET and Web Forms)
      XML Web Services
      Enterprise Windows Forms Applications




2
                                                                                                                                                  WHITEPAPER




   Enterprise Web Applications
   ASP and ASP.NET share little in common aside from the name. The fundamental differences give clues to the
                                                                                                                            The complex user interface
This document is in ASP.NETfor applications. Active Server1Pages thisuse a the
Registrationdocument, pleaseviewing into viewcompletelinear programming model
To access this that arise open Webis return to page to (ASP)browser.
   testing nuances information               required your web                                                              code generated by ASP.NET,
form. server-side scripting to create dynamic elements in a Web page.document.
Please switch
document. to your browser to read this ASP.NET, and specifically the Web Forms
   with
  class, uses a rich set of server controls along with an event model that lets developers use a traditional object-        along with the dynamic
  oriented programming style to build more complex Web applications
To provide or update your registration, using far less code than with classic ASP.
By completing this form once, you will have access to all similar                                                           nature of Web application
   Developers without Studio .NET to register again.
           this Visual needing
documentsusingdocument. can create Web applications using Web Server controls in a similar fashion                          development, can overwhelm
   to how Windows programmers would use the Windows Forms controls. These Web Server Controls allow
   programmers to set properties and create events against the various UI elements. The ASP.NET server processes            some testing tools.
   these controls at runtime to render the appropriate HTML, DHTML and JavaScript that can be understood by
   client browsers. While the resulting application is formally called a “thin” client, the client-side code can be
   complex. In summary, ASP.NET greatly simplifies Web application development through the use of server controls
   with properties and events familiar to most developers, and with behind-the-scenes state management that
   frees the developer to focus on more important issues. But from a testing perspective, ASP.NET sweeps many of
   the details under the rug — details that testers will need to extract and understand.

   Test Challenges
   Just as with other automated testing, QA professionals testing ASP.NET applications first seek to create parameterized
   scripts to automate functional, regression and load testing. ASP.NET presents challenges to the QA professional in
   creating and maintaining effective scripts. These challenges can be summarized in two general areas:
     Complex User Interface Code
     State Management Issues

   Complex User Interface Code
   The complex user interface code generated by ASP.NET, along with the dynamic nature of Web application
   development, can overwhelm some testing tools. There are many techniques used by test tools to do event
   recording, and some approaches are better than others. These differences are magnified when creating scripts
   against .NET applications. Given that the server renders the client dynamically, the guarantees found in static
   pages with simple script do not always apply. For tools that simply look for the first link in a page, ASP.NET can
   change the game in a hurry. Also, some tools will use standard x,y or indexed-based navigation to create their
   automated scripts and a simple change of UI can render existing scripts useless. Better test tools can recognize
   the actual objects rendered within a page to ensure that when things change, the script still works correctly.
                                   ®
   For example, Empirix’s e-TEST suite records user actions (such as a click, or setting a parameter) and locates
   objects using primary and secondary attributes such as <text> or other attributes that uniquely identify a portion
   of HTML or script. That way, if the object location changes (or is rendered dynamically by ASP.NET) it can still be
   referenced. Some simple examples:

   Mouseclick on a Link
     (click + window(index=0).link(text=”My ASP.NET link” | index=0))

   Set the Value of an Input Field on a Form
     (setParameter + window(index=0).form(index=0)
     .element[INPUT](type=”password” | index=1))

   Click on a Select List Control and Change its Value
     (click + window(index=0).form(“Form1” | “Form1” |
     index=0).element[SELECT](index=11 | type[1]=”select-one” |
     “tableEditor_CategoryID” | “tableEditor:CategoryID”))
     (change + window(index=0).form(“Form1” | “Form1” |
     index=0).element[SELECT](index=11 | type[2]=”select-two” |
     “tableEditor_CategoryID” | “tableEditor:CategoryID”))




                                                                                                                                                           3
     The story becomes even more complicated for applications that use client-side WebControls, formerly known as
     HTML Controls. Many companies have started to use these client-side objects to improve the user experience.                 Testing Web services
ThisExamples include the TabStrip please required again, the test tool must the
To access this document, andfor viewingOnceto viewcomplete recognize these objects and
       document is open TreeView controls. page 1 to this
Registration information is return toin your web browser.                                                                        presents a unique challenge
form. inside the object so robust browser generated thatthis document.intended by the developer
Please the control to For example, one might to to create use the real functionality
     get
document. used. your scripts can be wish read an automated test that simulates a user clicking on
          switch
     and                                                                                                                         since by definition Web
     a TreeView node. This is best done through explicit object recognition or through customizable scripts that can be
 To provide thisclient-sideonce, registration,
     created for any new form your
By completingor update object. you will have access to all similar                                                               services themselves have
    State this document.
documents without needing to register again.
          Management Issues                                                                                                      no inherent user interface.
       All Web developers must deal with state management because HTTP is stateless and most interesting applications
       require that state be maintained across page requests. ASP.NET provides a convenient mechanism, called
       view state, to maintain state each time the browser posts a page back to the server. View state automatically
       preserves page and control property values so that information associated with the page and the controls
       on the page are not lost with each round trip. The view state information is hashed into a string and saved in the
       page as a hidden field. When the page is posted back to the server, the server parses the view state string at
       page initialization and restores property information in the page. We show below an example of view state in the
       client-side source code.

        <form name=”Form1” method=”post” action=”WebForm1.aspx” id=”Form1”>
        <input type=”hidden” name=”__VIEWSTATE”
        value=”dDw0NDgzMjkxOTk7Oz7Kz8HOaJVVGI9w3Rwiple3sijyZQ==” />

       While this example shows a very small view state for a simple form with a TextBox and Button, in reality the
       view state field can grow to several kilobytes quite quickly, a size that will degrade the performance of a Web
       application as it is parsed back and forth. Additionally, using view state on complicated controls like the DataGrid
       can increase server-processing time substantially. So although view state is expedient for the developer, it can easily
       lead to performance bottlenecks in an ASP.NET Web application. When state information is not required on a control,
       have developers disable view state by setting the EnableViewState property to False. Test tools can perform simple
       tests to check for large view state fields. For example, testers using Empirix’s e-TEST suite can make use of an
       automated test to check that the ViewState data remains at a manageable size (for example, under 10KB).

       Finally, ASP.NET decides when to do postbacks based on the default behavior of specific controls and the
       AutoPostBack property. For example, a button click event will trigger a postback to the application server but a
       TextChanged event on a TextBox would not trigger a postback by default. Developers can override the default
       behavior by changing the AutoPostBack property to True. This yields the following client-side HTML along with
       associated JavaScript (not shown).

        <input name=”TextBox1” type=”text”
        onchange=”__doPostBack(‘TextBox1’,’’)” language=”javascript”
        id=”TextBox1” style=”Z-INDEX: 102; LEFT: 88px; POSITION:
        absolute; TOP: 72px” />

       Overzealous or inexperienced developers can abuse this in an attempt to create more interactive applications that
       respond to any user action. Testers again should consider creating custom scripts that report excessive usage of
       these “onchange” attributes.




 4
                                                                                                                                               WHITEPAPER




    XML Web Services
    XML Web Services simplify the communication between applications inside and outside companies, no matter the
                                                                                                                          Empirix's e-TEST suite
Registrationdocument, pleaseoperating systems.to viewcomplete the
To access this informationoris return to page 1 to to application integration
This document is open for viewing in your web browser. has always
   applications’ programming languages       required Application this                                                    will take a WSDL file and
form. difficult and expensive and Web Services removes many ofthis cost and complexity barriers. Web Services
Please switch
document. to your browser to read these document.
   been
   are defined at a basic level by XML, HTTP, , SOAP and WSDL. The Simple Object Access Protocol (SOAP) protocol,         automatically generate a
   for example, defines the Web                                                are written in
 Tocompleting this formServices message format. These messagesall similar eXtensible Markup
     provide                         once, registration,
By Language (XML) or update yourHypertext Transfer Protocol (HTTP). Most Web Services also have an                        test harness for it, thus
                     and are delivered using you will have access to
            this document.
   associated without Definition Language (WSDL) again.
documentsWeb Services needing to register that describes its capabilities, inputs and outputs.                            allowing for efficient and
    As a result, any client/user that wishes to communicate with a Web Service has the option to read the WSDL file       effective testing.
    to understand what information can be exchanged with the Web Service.

    There are three common approaches to using Web Services in enterprise applications. The first approach is using
    Web Services as a standardized application adapter for connecting back-end systems. Second, Web Services can
    be invoked by an ASP.NET server, and the response used as part of the information returned to end users. Finally,
    Web Services can be embedded within client Web pages and invoked by the browser (using XMLhttp or
    SOAPInvoke) to access content or services.

    Test Challenges
    Testing Web Services presents a unique challenge since by definition Web Services themselves have no inherent
    user interface. Traditional automated testing solutions rely on recorded end-user transactions that are scaled up
    for functional regression and performance testing. Without a UI to record against, Web Services testers have either
    1) not tested; or 2) relied on manual testing for functionality and have built performance tests from scratch.

    The ultimate goal is to expose the Web Services to a tester so he or she can use the same familiar tools used
    to perform functional regression and load testing against standard Web applications. The test tool should present
    an abstraction layer between the tester and the Web Service. Test tools can address this problem by presenting
    visual interfaces into the WSDL descriptions published by many Web Services and allowing the tester to
    parameterize and automate testing based on the structured information found within these WSDLs. For example,
    e-TEST suite will take a WSDL file and automatically generate a test harness for it (see, Figure 2.), thus allowing
    for efficient and effective testing.




    Figure 2: Web Services.




                                                                                                                                                        5
      If the WSDL is unavailable, test tools can capture actual SOAP requests through proxies, and then once again
      make this information available to testers in a structured way.                                                     Superior ease of use, scripting
To access this information is return to page 1 to
Registrationdocument, pleaseviewing and to viewcomplete the
                         is open for required your web browser.
ThisIndocument scripts can then be used to load in performance this
       either event, the                                       test, confirm functionality, and validate                  capabilities and support for
form. switch toexpected for various parameterized requests. document. must allow the tester
Please response
document. data your browser to read this In addition, test tools
     XML
     to chain Web Services together, taking the response from one Web Service and using it as part of a request
                                                                                                                          .NET technologies, and ROI are
 To  provide or update your registration,
     to another Web Service.
By completing this form once, you will have access to all similar                                                         a few advantages e-TEST suite
        this Windows Forms register again.
    Enterprisedocument.
documents without needing to Applications                                                                                 provides organizations in need
      Before .NET, there was a clear set of tradeoffs companies would make when choosing whether to create and            of an automated testing solution
      deploy browser-based (thin) clients or Windows (thick) clients. Thin clients worked for any user with a browser
      (that meant everyone) but did not allow for the interactivity, fast response times, and visualization flexibility
                                                                                                                          for ensuring the quality of their
      available with Windows applications. Although dynamic scripting, ActiveX controls, and Java applets increased       .NET applications.
      the power of thin-client application, there is only so much you can do when most of the logic and the data
      reside on the server. Thick clients give the developer more options to create a great user experience, download
      and manipulate data more easily, and exercise more complex client-side logic. However, these applications
      were difficult to deploy and update especially in application scenarios where the company did not have a
      captive audience.

      The .NET architecture and its Windows Forms classes improve Windows application deployment in two ways. First,
      the Windows applications run within the .NET framework as managed code so there are no COM interaction issues
      which caused so many problems in the past. With COM-based applications, it was common to have DLL conflicts
      with other installed software. This was debilitating especially when the user was outside the company with an
      uncontrolled set of applications. Second, with .NET, companies can deploy and update .NET Windows applications
      from a Web server. These Web-deployed clients result in applications better suited to intra-company needs or to
      data-intensive applications deployed to partners.

      Microsoft has blurred the distinction between Web and Windows applications and many corporate Windows
      applications are using XML, SOAP and HTTP to communicate with servers.

      Test Challenges
      For both load testing and functional regression testing, a test tool must understand the standards-based
      communication techniques used by these Windows applications. Test tools can use a proxy service residing on
      the Windows client or elsewhere to capture and expose the structured messages sent between the client and the
      server. The test tool must capture the structures and parameterize both the key header and payload data so
      testers can view this information and easily create automated test scripts from the fields contained within the
      messages. Finally, testers can leverage these scripts to perform both functional regression and load tests.

      Summary
      While black-box testing is important, QA testers can be more effective and help developers more by having .NET
      specific knowledge and .NET-aware testing tools to provide better automation and more useful testing results.

      Empirix .NET Testing Solutions
      Empirix’s enterprise testing solutions allow organizations to ensure the quality and performance of their .NET
      applications so they can deploy these applications with confidence. The Empirix e-TEST suite provides an
      integrated solution for ensuring .NET application quality and performance. e-TEST suite includes e-Manager®
                                                              ®                                              ®
      Enterprise for functional and regression testing, e-Load for load and scalability testing, and e-Tester for test
      process management and defect tracking.




 6
                                                                                                                            WHITEPAPER




   e-Manager Enterprise allows users to document and manage their application testing processes to determine
   when new .NET applications are ready for deployment. e-Manager Enterprise allows users to document test
To access this document,store manualrequired to viewcomplete the defects and report
This documenttest plans, please return to page 1 toand test results, track
   requirements, create is open for                 and automated your
Registration information isviewing in test casesweb browser.                   this
form.the overall testing process all in one integratedto read this via a browser. e-Manager Enterprise helps
   on
Please switch test cycle times by enabling               platform accessible
                                                                             document.
document.reduceto your browser a collaborative approach to testing while improving the efficiency
   organizations
   and increasing the visibility of the testing process.
 To provide this form once, you will have access to all similar
By completingor update your registration,
   e-Tester allows users to create automated test scripts to validate the functionality and performance of .NET-based
           this document.
   Web applications and needing to register also provides built-in functional and regression testing
documents without.NET Web services. e-Tester again.
    capabilities. Leveraging Empirix’s OneScript™ integrated platform, scripts created in e-Tester can be used for
                                                                                                                        ®
    functional and regression testing, load testing (using e-Load) and 24X7 application monitoring (using OneSight
    or FarSight ). e-Tester also provides extensive functional and regression testing features including an easy-to-use
                ®


    Visual Script interface, a wide range of default and user-defined test cases to verify application functionality, and
    an integrated Visual Basic for Applications environment for extending and customizing test scripts. This
    provides users with a powerful combination of ease-of-use and flexibility to meet any testing challenge.

    e-Load is an enterprise load and performance testing solution that allows users to stress .NET Web applications
    and Web services while analyzing application performance and scalability. By reusing scripts created in e-Tester,
    users can simulate hundreds or thousands of virtual users interacting with their .NET applications. And by leveraging
    e-Load’s built-in ServerStats performance and transaction monitors, users can identify and address .NET application
    performance bottlenecks before they impact end users. ServerStats performance monitors allow users to monitor
    key performance metrics for their .NET servers and infrastructure components, including CPU utilization, memory
    consumption and connections, and correlate these metrics to Virtual User performance in real-time as the test runs.
    This integrated set of features provides e-Load users with the tools they need to maximize the performance of .NET
    Web applications and Web services.




                                                                                                                                     7
       Advantages of e-TEST suite for Testing .NET Applications
       The e-TEST suite provides a number of advantages for organizations in need of an automated testing solution for              OneSight and the Service
Registrationdocument, pleaseviewingadvantages include: browser.
To access this information is return page 1 to this
Thisensuring the quality istheir .NET applications. Thesetointo viewcomplete the
      document of open for required your web                                                                                        Level Manager deliver the
form. switch to your browser to read this document.
Please
document.
   Superior Ease of Use and Time to Value. e-TEST suite features an intuitive graphical scripting interface, numerous               information necessary for
   built-in test cases and wizards, and powerful load testing capabilities that allow users to allow users to get up and
Tocompletingor update yourcomplex Web applications in minutes. similar
   providebegin testing begin testingyou will have access to all
By running and this form once, registration,                                                                                        your organization to prioritize
         this document.
    Superior without needing to register again.
documents Scripting Capabilities and Support for .NET Technologies. Empirix’s e-Tester offers the broadest                          response effectively, manage
       support for .NET technologies. Its integrated WebSmart recording engine captures user interactions directly at the
       browser’s document object model (DOM) level, which allows scripts to work out of the box with no additional
                                                                                                                                    and improve the services
       programming or modifications required. Traditional testing tools utilize a protocol-level recording mechanism that           you deliver to the business
       automates test scripts by recording and replaying the underlying protocol requests generated by the application.
       As a result, these tools are not well equipped to handle the protocol-level variability or rich user interfaces of today’s   continually, improve productivity,
       complex and dynamic .NET applications. In turn, users are forced to spend more time manually programming their               and align your organization
       scripts to make them work.
                                                                                                                                    with corporate business goals.
       Integrated Testing for .NET Applications and Web Services. With e-TEST suite, users can leverage the same
       testing solution for testing both their .NET Web Applications and Web Services. With e-Tester, users can
       automatically generate test scripts for their .NET Web Services through a wizard by simply pointing at a WSDL file
       or by specifying the SOAP request. Users do not need to build separate user interfaces to test their Web Services.
       Users can then parameterize extend their scripts using e-Tester’s Databank Wizard, built-in test cases and the full
       capabilities of the integrated VBA programming interface. e-Load allows users to run integrated load tests to
       stress both .NET Applications and XML Web Services.

       Common Scripting Platform. Empirix provides OneScript, a common scripting platform for functional and
       regression testing, load testing and application performance management. The same set of scripts can be
       re-used across all Empirix products which saves users from having to re-record scripts or learn a new scripting
       environment for different testing and monitoring needs. Traditional testing products require users to create
       different sets of scripts for various testing and monitoring needs, which leads to additional testing time and a script
       maintenance burden.

       Superior ROI. Empirix provides superior value by providing a combination of better price/performance, more flexible
       licensing, pricing, and maintenance renewal options, and faster return on investment since the tools are much
       easier to use and do not require extensive training or programming expertise.




 8
                                                                                                                                                                                  WHITEPAPER




    Empirix Product Support for Specific .NET Technologies
Registrationdocument, pleaseviewing into viewcomplete the
To access this information is requiredNOTABLEweb browser.
This document is open for return to page 1 to FEATURES
    .NET CLIENT TECHNOLOGY              your this
form. switch to your browser to read this DOM-based recording,
document.
Please ASP.NET Web Applications
    Thin-client                       WebSmart document.
                                                                                              true browser automation.
 To ASP.NET Web Forms (aspx, HTC controls, etc.) will have access to all tests VB
     provide this form once, you
By completingor update your registration,functional tests similar extensibility for
                                                         ViewState and Postback
                                                         native               of .NET controls.
           this document. to register again. suite Web Services testing module
              without needing
documentsWeb Services (asmx)
    .NET XML                                             e-TEST
                                                                                              automatically generates Web Services testing
                                                                                              scripts from WSDL files, SOAP requests of
                                                                                              manual manipulation.
      Windows forms (Web-deployed)                                                            Easy-to-use functional and load testing, using native
                                                                                              .NET evenT automation and validation.
      .NET SERVER TECHNOLOGY                                                                  NOTABLE FEATURES
      Windows Operating Systems                                                               ServerStats for Windows Server monitoring during
                                                                                              performance tests.
                                                                                              Functional Testing and Load Agents run on
                                                                                              any Windows platform.
      COM Components                                                                          ServerStats for COM+ server monitoring during
                                                                                              performance tests.
                                                                                              Component functional and performance testing with
                                                                                              VB extensibility. Microsoft SQL Server SUPPORTED.
                                                                                              ServerStats for SQL Server monitoring during
                                                                                              performance tests.
      Microsoft SQL Server                                                                    ServerStats for SQL Server monitoring during
                                                                                              performance tests.




    ©2004 Empirix. All rights reserved. All descriptions, specifications and prices are intended for general information only and are subject to change without notice. Some
                                                                                                                                                                                    WPDOTNET11.04
    mentioned features are optional. All names, products, services, trademarks or registered trademarks are used for identification purposes only and are the property of their
    respective organizations.




 Corporate HQ | 20 Crosby Drive | Bedford, MA 01730 | USA | tel: +1 781.266.3200 | fax: +1 781.266.3201 | www.empirix.com
 European HQ | Building A, Trinity Court, Wokingham Road | Bracknell, Berkshire RG42 1PL | United Kingdom | tel: +44 (0)1344 668080 | fax: +44 (0)1344 668172

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:133
posted:11/12/2007
language:English
pages:9
Honey Singh Honey Singh Co-Founder http://www.honeytechblog.com
About Honey is a zealous web and graphics designer (currently working with media redefined ) having a creative and devouring gumption with an experience of over 3 years in Interactive Designing , Blogging and Web technologies.